Wheel Selector, animated React component
A radial selector: a ring of icon nodes you drag round, fling, scroll or step with the arrow keys. It coasts, snaps to the nearest stop with a little overshoot, and the node at the top swells and fills with its colour while the hub counter rolls and the side panel swaps to that item.
- Free
- Feature Sections
- Spring
Ticks as each item passes the top and drops softly when the dial settles on a choice. Sound is off on this site until you switch it on.
Like Wheel Selector? 287 more are in Pro.
Pro unlocks all 287 Pro components, every template and block, and everything we release next. Wheel Selector stays free.
Play with it
Move the controls and watch it change. Copy code gives you a snippet with only the props you changed.
Direction
Product strategy
Positioning, narratives and roadmaps that line teams up around outcomes you can measure.
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| items | WheelItem[] | — | Entries: id, label, title, optional subtitle, description, accentColor, icon (16 built-in names) or iconImageUrl, image, ctaHref and ctaLabel. |
| activeIndex | number | — | Controlled selection; the dial turns the short way to it. |
| onActiveChange | (index: number) => void | — | Called when the dial settles on a new item. |
| variant | "responsive" | "desktop" | "mobile" | "responsive" | Panel beside the dial when there is room, always beside it, or always stacked. |
| contentMode | "minimal" | "detailed" | "hidden" | "detailed" | Title only, title with description and image, or no panel. |
| ringRadius | number | 112 | Radius of the ring of nodes in px, 80 to 220. |
| tickCount | number | 60 | Ticks round the rim, 12 to 120. |
| showTicks | boolean | true | Show the rotating rim ticks. |
| showCounter | boolean | true | Show the rolling 02 / 06 counter in the hub. |
| showCTA | boolean | false | Show each item's CTA link in the panel. |
| animationSpeed | "slow" | "medium" | "fast" | "medium" | How snappy the snap spring is. |
| accentColor | string | "#0071e3" | Accent for items without their own accentColor. |
| autoplay | boolean | false | Turns the wheel one stop at a time until someone touches it. |
| autoRotate | boolean | false | Older name for autoplay. |
| autoRotateInterval | number | 3000 | Milliseconds between autoplay turns (1200 to 15000). |
| className | string | — | Extra classes for the section. |
| enableSound | boolean | true | Plays interface sounds on interaction. They follow the sound switch (setSoundsEnabled, on by default) and stay silent on hover. Autoplay makes the same sounds once the visitor has used the page. Pass false to silence this component. |
Add it to your project
- 1
Set up your project once
You need a Next.js project with Tailwind CSS and the
@/import alias. In its root folder, run this once. It createscomponents.jsonand thecn()helper insrc/lib/utils.ts:npx shadcn@latest init -d
Starting from nothing? The Quick Start walks through the whole thing.
- 2
Connect the registry
Run this once per project. It writes the Nexus UI entry into
components.jsonfor you:npx shadcn@latest registry add "@nexus-labs=https://www.nexus-ui.com/api/registry/{name}"Type it exactly as shown.
{name}is filled in by the CLI with the component you ask for, so you never replace it.
- 3
Add the component
Run this from your project root. It adds the component, the helpers it imports and its npm packages.
npx shadcn@latest add @nexus-labs/wheel-selector
- 4
Check what was added
With a project made as in the Quick Start (a
src/folder), these files land in it:components/wheel-selector/index.tswheel-selector.tsx - 5
Copying by hand? Skip the registry
Instead of steps 2 and 3 you can copy the files yourself, with no registry and no API key. Step 1 still applies, so that
cn()exists. Install the packages:npm install framer-motion
Then show the source and create each file at the path it gives:
- 6
Use it in a page
Installing only adds the files. Import the component in a page and render it. The Usage tab on the preview shows a fuller example with props:
// src/app/page.tsx import { WheelSelector, type WheelItem } from "@/components/wheel-selector"; export default function Page() { return ( <main> <WheelSelector /> </main> ); }
Like Wheel Selector? 287 more are in Pro.
Pro unlocks all 287 Pro components, every template and block, and everything we release next. Wheel Selector stays free.
Wheel Selector questions
Does it make sound, and how do I turn it off?
Ticks as each item passes the top and drops softly when the dial settles on a choice. Sounds are synthesised with the Web Audio API, so there are no audio files, and they only play after a click or key press. Pass `enableSound={false}` to silence this component, or call `setSoundsEnabled(false)` from `@/lib/ui-sounds` to switch every sound off at once. The CLI installs `@/lib/ui-sounds` with the component.