# Spotlight Card

> A card whose border and surface light up around the mouse.

```tsx
import { Button, SpotlightCard } from '@brand-studio/ui';

const plans = [
  { name: 'Taster', price: '£9', detail: 'One 250 g bag a month' },
  { name: 'Regular', price: '£16', detail: 'Two bags, one of them a new lot' },
  { name: 'Roaster', price: '£28', detail: 'Three bags and a tasting note' },
];

export default function SpotlightCardDemo() {
  return (
    <div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(180px, 1fr))', gap: 16, width: '100%', maxWidth: 720 }}>
      {plans.map(plan => (
        <SpotlightCard key={plan.name} style={{ padding: 24 }}>
          <h3 style={{ margin: '0 0 8px', fontSize: 16 }}>{plan.name}</h3>
          <p style={{ margin: '0 0 4px', fontSize: 28, fontWeight: 600 }}>{plan.price}<span style={{ fontSize: 14, fontWeight: 400, color: 'var(--bs-muted)' }}> / month</span></p>
          <p style={{ margin: '0 0 20px', color: 'var(--bs-muted)', fontSize: 14 }}>{plan.detail}</p>
          <Button tone="secondary" style={{ width: '100%' }}>Choose {plan.name}</Button>
        </SpotlightCard>
      ))}
    </div>
  );
}
```

## Installation

```sh
npm install @brand-studio/ui
```

React 18 or 19 is a peer dependency. Import the stylesheet once and wrap the app in a brand theme:

```tsx
import '@brand-studio/ui/styles.css';
import { BrandTheme, SpotlightCard } from '@brand-studio/ui';
import brand from './brand.json';

<BrandTheme palette={brand.tokens} mode="system">
  {/* your app */}
</BrandTheme>
```

## Usage

```tsx
import { SpotlightCard } from '@brand-studio/ui';
```

```tsx
<SpotlightCard>
  <h3>Regular</h3>
  <p>Two bags a month</p>
</SpotlightCard>
```

## Accessibility

- The light is drawn with CSS and adds nothing for screen readers.
- Keyboard focus on anything inside lights the whole edge, so keyboard users see which card they are in.
- Only a mouse moves the light; touch and reduced motion see a plain card.

## API Reference

| Prop | Type | Default |
|---|---|---|

Source: https://brandstudio.js.org/docs/components/spotlight-card/
