Model Wheel

Names on a turning drum that always lands exactly on a row.

PROGet Model Wheel and 168 other Pro components with pro lifetime — Get Pro

Category
Creative
Access
Pro
Source
493 lines · one file
States
5 drawn
Added
21 Oct 2026

The decision inside it

It always lands on a row, and says so

A throw is projected forward, rounded to the nearest row and carried there by a spring, so it never rests half a row off. Then it calls onLand(name, index), which makes it a real picker or slot reveal, not only decoration.

When to use it

Use Model Wheel for names on a turning drum that always lands on a row: a picker with onLand, a slot-style reveal, or a hero piece that cycles on its own. For a real model menu with prices use Model Picker.

Installation

How you get it

Paste this into Claude Code, Cursor, Codex or any coding agent. It installs the file and uses it as it is, instead of writing a new one.

Use Liro's Model Wheel for this.
Install it: npx shadcn@latest add @liro/model-wheel
(the @liro registry is set up in components.json, with LIRO_KEY in .env.local)
Import it from @/components/ui/model-wheel.
Do not rewrite or restyle it. Pass my data through its props
and keep its built-in states.

For the full brief with every prop and the mistakes assistants usually make, use Copy prompt above. Pro components install through the @liro registry with your CLI token: see the Namespaced tab.

Usage

components/model-reveal.tsx
import { ModelWheel } from "@/components/ui/model-wheel";

export function ModelReveal({ choose }: { choose: (name: string) => void }) {
  return <ModelWheel items={["Swift", "Balanced", "Deep", "Vision", "Scribe"]} defaultValue="Balanced" onLand={(name) => choose(name)} />;
}

API reference

“Copy prompt” above puts a full brief on your clipboard, install command, dependencies, props, and the mistakes an assistant usually makes with this component.

Props

Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.

TypeNotes
itemsModelWheelItem[] Yes–
valuestring NoThe name to land on. Changing it turns the wheel there.
defaultValuestring NoThe name it starts on, uncontrolled. Default: the first item.
onLand(name: string, index: number) => void NoCalled each time the wheel comes to rest on a row.
autoSpinboolean NoSpin a lap or two on first view, then settle. Default true.
spinKeynumber NoChange this number to spin (with laps) to the current `value` again.
cyclenumber NoLand on a new random row every N ms while on screen and not held.
rowHeightnumber NoRow height in px. Default 44.
reachnumber NoRows visible above and below the middle, roughly. Default 3.
interactiveboolean NoDrag, scroll, click and keys. Default true.
labelstring NoNames the listbox. Default "Model".

Dependencies

npm packages

clsxframer-motiontailwind-merge

Liro foundations, installed alongside it

liro-theme

States

All of them are drawn by the component. None is left for you to design.

  • Spinning
  • Landed
  • Dragging
  • Cycling
  • Reduced motion

Accessibility

  • Keyboard reachable throughout, in visual order
  • Focus trapped in overlays, Escape closes them
  • Focus returns to whatever opened it
  • Live regions announce what changed, not that something did
  • Honours prefers-reduced-motion

Responsive behavior

  • Sizes to its container, not the viewport
  • Usable from 320px up
  • Pointer-based interaction, so trackpad and touch both work
  • No hover-only affordances