Components
Segment Spotlight
Segmented headline with hover-driven focus, blur states, and an animated dashed highlight box.
interactivemarketinganimationmotionaccessibility
Ship 10x faster with real-time sync & AI insights
Installation
$npx shadcn@latest add /r/segment-spotlight.jsonAPI Reference
| Prop | Type | Default | Description |
|---|---|---|---|
segments | SegmentSpotlightSegment[] | - | Ordered text fragments that make up the headline. Each item is { id, text }. |
focuses | SegmentSpotlightFocus[] | - | Focus buttons; hovering one highlights its segmentIds. Each item is { id, label, icon, segmentIds }. |
className | string | - | Classes merged onto the outer wrapper. |
headingClassName | string | - | Classes merged onto the headline row. |
Customization
- Pass
classNameto restyle the component — classes are merged withcn, so your utilities win. - Styling uses Tailwind utility classes and theme tokens, so it adapts to light/dark mode automatically.
- Tune behavior with the props in the API reference above (e.g.
segments).