# Spotlight Button

> A quiet button lit from where the pointer is.

A soft pool of light on the face and a brighter line on the nearest edge. For dense toolbars and dark landing pages.

- Family: Buttons
- Plan: Creative. Included with Creative.
- Requires: React, Tailwind CSS v4 and the motion package
- Page with a live preview: https://galactrex.com/ui/spotlight-button/
- 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-button
```

It installs to `components/galactrex/spotlight-button.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 { SpotlightButton } from "@/components/galactrex/spotlight-button";

<SpotlightButton onClick={share}>Share</SpotlightButton>
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `children` | `ReactNode` | — | Label. |
| `size` | `number` | `90` | Radius of the light in px. |
| `...button props` | `ButtonHTMLAttributes` | — | onClick, disabled, type and the rest. |

## Variants

- **Toolbar.** A row of them over a dark surface.

## Accessibility

- A real button; light layers are aria-hidden and off on touch.

## Motion

- Motion values drive the light without re-rendering.
