Skip to content
Hazine

Spotlight Card

Card with a soft radial highlight that follows the pointer inside its bounds and fades out on leave. The highlight size and colour are CSS variables that default to the primary token.

How it differs. A single card lit by one radial layer positioned through custom properties set on pointer move, with content above the layer and no layer on touch.

Install

pnpm dlx shadcn@latest add @hazine/spotlight-card

Adds 1 file.

First time? Add the registry to components.json
{
  "registries": {
    "@hazine": "https://api.hazine.dev/r/{name}.json"
  }
}

Needed once per project. Items resolve each other through the @hazine namespace.

Props0

Accepts every prop of React.ComponentProps<"div">.

Accessibility

Pattern
Landmarks and headings
Keyboard
Nothing to operate. The item has no focusable parts.
Screen reader

A plain container. The highlight layer is decorative, hidden from assistive technology and ignores pointer events.

Reduced motion
The highlight layer is not rendered.
Checked
Not checked yet. Automated results appear here once CI has run.

Dependencies0

None. The item is one self-contained file.

Tokens shipped0

None. The item is styled by the tokens your theme already has.

More in Media and Motion