Arc Selector
Arrange products in a semicircle. Hover a thumbnail or select it with the keyboard to bring that product into the center.
- Dependencies
- gsap
- Size
- 372 lines
- Controls
- 7 controls
Installation
CLI · shadcn registry
npx shadcn@latest add https://ui.onycx.dev/r/arc-selector.json1 · Dependencies
npm install gsap2 · Copy the source
components/onycx/arc-selector.tsx
Requires React 19 and Tailwind CSS v4. Copy the source from the arc-selector.tsx tab after tweaking: your values are baked in as the new defaults. Exported image examples use portable sample artwork. Replace it with your own media as needed.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| items | ArcItem[] | — | { label?, kind, name, note?, price?, image, thumb?, imageAlt?, href? }; chips are links when href is set, otherwise aria-pressed buttons. Nine items fill the ring layout exactly; more wrap its positions. |
| eyebrow / heading / intro | string | — | Header copy; *asterisks* set the italic serif, a newline in intro breaks the line from 768px. |
| orbitEyebrow / captionEyebrow | string | — | Pill above the narrow-layout caption, and the eyebrow under the desktop dish. |
| links | { label, href }[] | two category links | Row under the stage separated by ✳; pass [] to hide it. |
| defaultIndex | number | 0 | Product shown first. |
| accent | string | "#b5939c" | Section eyebrow colour. |