# Spotlight Card

> A surface lit from where the pointer is.

A soft light on the face and a brighter one on the nearest border. Use it for feature grids, pricing and settings sections; with `href` the whole card is one link.

- Family: Cards
- Plan: Creative. Included with Creative.
- Requires: React, Tailwind CSS v4 and the motion package
- Page with a live preview: https://galactrex.com/ui/spotlight-card/
- Licence: https://galactrex.com/ui/license/

## Install

```sh
npx @galactrex/ui login   # once, with an API key from https://galactrex.com/account/
npx @galactrex/ui add spotlight-card
```

It installs to `components/galactrex/spotlight-card.tsx`, with the shared motion helpers beside it. First time in a project: `npx @galactrex/ui init` (setup guide: https://galactrex.com/docs/ui-components-setup/).

## Usage

```tsx
import { SpotlightCard } from "@/components/galactrex/spotlight-card";

<SpotlightCard href="/pricing/">
  <h3>Creative</h3>
  <p>Everything in Essential, plus the coding apps.</p>
</SpotlightCard>
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `children` | `ReactNode` | — | Card content. |
| `href` | `string` | — | Makes the whole card a link. |
| `size` | `number` | `320` | Radius of the light in px. |
| `intensity` | `number` | `0.08` | Strength of the surface light, 0 to 1. |
| `className` | `string` | — | Extra classes for the outer element. |

## Variants

- **Card.** Content surface.
- **Link card.** With `href`, focusable with a visible ring.

## Accessibility

- With href it is one link with a focus ring; without, a plain container.
- Light effects are aria-hidden and off on touch.

## Motion

- Pointer light through motion values; no re-render per move.
- Fades over 300 ms.
