---
title: "Number Wheel"
description: "Pick a number by turning a wheel, from a minimum to a maximum in steps. It formats the number for the locale and can show a unit, such as min."
url: https://gelatinui.com/components/number-wheel
markdown_url: https://gelatinui.com/components/number-wheel.md
access: pro
install: "npx shadcn@latest add @gelatin-ui-pro/number-wheel"
version: "2026-11-09"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Number Wheel

> Pick a number by turning a wheel, from a minimum to a maximum in steps. It formats the number for the locale and can show a unit, such as min.

Page: https://gelatinui.com/components/number-wheel

## When to use it

Best for: Pick a number from a short range with a thumb, with an optional unit after it.

- Use it for a small range, such as 1 to 20, or 5 to 120 by 5.
- Use `formatOptions` for a currency or a percent, and `unit` for a word after the number.

## When not to use it

- For a number people type, use a [Number Field](https://gelatinui.com/components/number-field.md).
- For a value on a track, use a [Slider](https://gelatinui.com/components/slider.md).

## Notes for agents

- The rows run from `min` to `max` by `step`. A value off the step shows on the nearest row.
- `loop` is off by default, because a number has ends.
- Put the unit in `aria-label` too: the unit is not spoken.
- `name` sends the number with a form.

## Anatomy

```text
NumberWheel
```

## API reference

### NumberWheel

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `name` | `string` |  | The form field name: a hidden input sends the number. |
| `layout` | `WheelLayout` |  | `drum` bends the rows on a turning wheel; `flat` only fades them. |
| `visibleItems` | `number` |  | How many rows show, an odd number (5 by default). |
| `readOnly` | `boolean` |  |  |
| `invalid` | `boolean` |  |  |
| `size` | `"default" \| "lg" \| "sm"` |  |  |
| `variant` | `"framed" \| "plain"` |  |  |
| `value` | `number` |  |  |
| `defaultValue` | `number` |  | The first value; `min` when left out. |
| `onValueChange` | `function` |  |  |
| `min` | `number` | 0 |  |
| `max` | `number` | 100 |  |
| `step` | `number` | 1 | The space between two rows. |
| `loop` | `boolean` | false | Turn past `max` back to `min` (off by default: a number has ends). |
| `formatOptions` | `NumberFormatOptions` |  | How each row reads: digits, a currency, a percent (`Intl.NumberFormat` options). |
| `unit` | `ReactNode` |  | A unit after the column ("kg", "min"). Put it in `aria-label` too. |

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| NumberWheel | `number-wheel` |  |  |  |

## Usage

Set `min`, `max`, and `step`. Add a `unit` after the column.

```tsx title="focus-minutes.tsx"
import { NumberWheel } from "@/components/ui/pro/number-wheel";

export function FocusMinutes() {
  return (
    <NumberWheel aria-label="Minutes" min={5} max={120} step={5} defaultValue={45} unit="min" />
  );
}
```

## Compose

Rules:

- Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts.
- Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry.

## Add it

```bash
npx shadcn@latest add @gelatin-ui-pro/number-wheel
```

It adds 20 registry items: 20 files, 3351 lines, and the npm packages `@mantine/hooks`, `motion`, `tailwind-merge`, `tailwind-variants`.

## Built on

- [Wheel](https://gelatinui.com/components/wheel.md)

## For AI agents

- Every item, one file: https://gelatinui.com/llms.txt
- MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp

## Related

- [Wheel](https://gelatinui.com/components/wheel.md)
- [Number Field](https://gelatinui.com/components/number-field.md)
- [Slider](https://gelatinui.com/components/slider.md)

## Keyboard

| Keys | Action |
| --- | --- |
| Tab | Moves to the next column. Each column is one tab stop. |
| Up Arrow, Down Arrow | Turns the column one row and sets the value. |
| Page Up, Page Down | Turns the column five rows. |
| Home, End | Goes to the first or the last row that is not disabled. |
| Left Arrow, Right Arrow | Moves to the column before or after. |

## Accessibility

Each column is a range input: one tab stop, with the row text as its value text.

The mouse wheel turns a column only while it has focus, so the page scroll never stops on it.

On a touch screen every row is 44px high.

## Motion

| Part | Motion |
| --- | --- |
| Flick | glide · a physics spring that keeps the flick speed and settles on the nearest row |
| Keys and taps | glide · spring to the new row |
