Account

Buttons

Creative

Spotlight Button

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

Install

Included with Creative: needs your API key. Initialize and log in once.

Terminal
npx @galactrex/ui add spotlight-button

Usage

Example
import { SpotlightButton } from "@/components/galactrex/spotlight-button";

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

Source

Installs to components/galactrex/spotlight-button.tsx, with the shared motion primitives beside it.

Source for this component comes with its plan. Install it with the command above, or open your licensed copy here.

See plans

Props

PropTypeDefaultDescription
childrenReactNode—Label.
sizenumber90Radius of the light in px.
...button propsButtonHTMLAttributes—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 and reduced motion

  • Motion values drive the light without re-rendering.