SpotlightCard
A card lit by a glow that follows the pointer.
Animatedimport { SpotlightCard } from 'umbra-ui/motion'
Props
| Prop | Type | Default | Description |
|---|---|---|---|
asChild | boolean | false | Render the single child element (e.g. an `<a>`) as the card. |
interactive | boolean | false | Adds hover and focus affordances for cards that act as a link or button. |
reducedMotion | "system" | "always" | "never" | "system" | Reduced-motion override. Under reduced motion the light fades in centred and does not follow the pointer. |
size | "sm" | "md" | "lg" | "md" | Inner padding. |
spotlightSize | number | 360 | Diameter of the light in px. |
variant | "outline" | "ghost" | "surface" | "surface" | `surface` is a filled layer, `outline` is border only, `ghost` has neither. |
Usage notes
Takes every Card prop.
Accessibility
- The light is decorative.
- Under reduced motion the light does not track the pointer.
Import
import { SpotlightCard } from 'umbra-ui/motion';
import 'umbra-ui/styles.css'; // once, at the root of your app