Ring Carousel
Browse portraits and headlines around a rotating dashed ring in a pinned scroll section.
- Dependencies
- gsap
- Size
- 337 lines
- Controls
- 6 controls
Installation
CLI · shadcn registry
npx shadcn@latest add https://ui.onycx.dev/r/ring-carousel.json1 · Dependencies
npm install gsap2 · Copy the source
components/onycx/ring-carousel.tsx
Requires React 19 and Tailwind CSS v4. Copy the source from the ring-carousel.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 |
|---|---|---|---|
| slides | RingSlide[] | — | { word, image, imageAlt? } per slide; the ring turns 360 / slides.length per slide. |
| callouts | RingCallout[] | — | { label, top, left?, right?, align? } boxes placed inside the ring box (lg+ only); they rotate with the ring like the original. |
| title | string | "Aesthetic Curation" | Thin, 0.15em-tracked title with its glowing accent bar; centred on phones, top-right from 768px. |
| cardLabel / cardText | string | — | Static blurred info card shown below 1024px. |
| stepDistance | number | 1000 | Pinned scroll per slide (px); total pin is n × stepDistance. |
| scrub | number | 1 | Seconds of smoothing. |
| accent | string | "#ff0000" | Ring, ticks, glow, callouts and title bar. |