# Spotlight

> A brand glow that trails the cursor across a card on a spring. It moves by transform, so it never repaints the card.

Section: Motion. Docs: https://entrepta.vercel.app/docs/components/spotlight

## Install

```bash
npx @entrepta/cli@latest add spotlight
```

Files: `motion/spotlight.tsx`.
npm packages: `motion`.

## Usage

```tsx
import { Spotlight, useSpotlight } from "@/components/entrepta/spotlight"

function GlowCard() {
  const { onMouseMove, spotlight } = useSpotlight(560)
  return (
    <Card onMouseMove={onMouseMove}>
      <Spotlight {...spotlight} />
      …
    </Card>
  )
}
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `useSpotlight(size?)` | `{ onMouseMove, spotlight }` | - | Size is the glow diameter in px, 560 by default |
