# Number stepper

A value on a readout between minus and plus keys, with MIN and MAX tags.

[View Number stepper on CyberSpec](https://www.cyberspec.dev/components/sidebar/stepper)

## Component

Number stepper belongs to the Fields group in the CyberSpec catalog. It uses @ui-sdk/react/number-input, @ui-sdk/react/field.

## Installation

Use a React 19 project with shadcn configured. Render the installed components inside the Cyber root, and import your global stylesheet in the app entry point.

```sh
bunx --bun shadcn@latest add https://www.cyberspec.dev/r/stepper.json
```

## Example

```tsx
"use client"

import { Stepper } from "@/components/ui/stepper"

export default function StepperDemo() {
  return (
    <>
      <Stepper label="Frame" defaultValue={9} min={3} max={20} wheel hint="Focus the value and use the wheel to adjust." />
      <Stepper label="Reflex" defaultValue={3} min={3} max={20} />
      <Stepper label="Edge" defaultValue={6} min={3} max={20} hint="Locked until the next tier." disabled />
    </>
  )
}
```

## Install this example

```sh
bunx --bun shadcn@latest add https://www.cyberspec.dev/r/stepper-demo.json
```

## Resources

- [Interactive Number stepper preview](https://www.cyberspec.dev/preview/stepper)
- [Component catalog](https://www.cyberspec.dev/components.md)
- [Number stepper source code](https://github.com/agnelnieves/cyberspec/blob/main/registry/cyber/ui/stepper.tsx)
- [Shadcn registry item](https://www.cyberspec.dev/r/stepper.json)
