Skip to content
ProLifetime access for $199, paid once, every future release included
Truffle UI

Spotlight Card

Pro

A card with a light that follows the pointer and traces the border.

Installation

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

First time? Add the @viewport registry to components.json. Setup takes one minute.

Usage

The code behind the preview above comes with Truffle Pro.

Props

PropTypeDefault
colorstring

Spotlight color. Any CSS color.

"color-mix(in oklch, var(--brand) 55%, transparent)"
sizenumber

Spotlight diameter in pixels.

360

Accessibility

  • Effect layers are aria-hidden and never intercept clicks.
  • Pointer position is written to CSS variables with no re-renders.
  • Content stays fully readable without the effect.