# Number input (UI SDK): Step

> `step` is the usual increment. Shift, Page Up and Page Down move by `largeStep`, and Alt or Option with an arrow key by `smallStep`. Hold a button to repeat.

Canonical: https://hextaui.com/docs/ui-sdk-number-input/examples/step

Component docs: https://hextaui.com/docs/ui-sdk-number-input

## Add this example

```bash
npx shadcn@latest add https://hextaui.com/r/ui-sdk-number-input-step.json
```

This adds `components/examples/ui-sdk-number-input/step.tsx` with the Number input component and the HextaUI theme tokens.

## Source

```tsx title="components/examples/ui-sdk-number-input/step.tsx"
import { Label } from "@/components/ui/label"
import {
  NumberInput,
  NumberInputControl,
  NumberInputDecrement,
  NumberInputGroup,
  NumberInputIncrement,
} from "@/components/ui/ui-sdk-number-input"

function UiSdkNumberInputStep() {
  return (
    <div className="grid w-full max-w-sm grid-cols-2 gap-4">
      <div className="flex flex-col gap-2">
        <Label htmlFor="temperature">Temperature</Label>
        <NumberInput
          defaultValue={0.7}
          min={0}
          max={2}
          step={0.1}
          largeStep={0.5}
          smallStep={0.01}
        >
          <NumberInputGroup>
            <NumberInputDecrement />
            <NumberInputControl id="temperature" />
            <NumberInputIncrement />
          </NumberInputGroup>
        </NumberInput>
      </div>
      <div className="flex flex-col gap-2">
        <Label htmlFor="max-tokens">Max tokens</Label>
        <NumberInput
          defaultValue={4096}
          min={256}
          max={32768}
          step={256}
          largeStep={4096}
        >
          <NumberInputGroup>
            <NumberInputDecrement />
            <NumberInputControl id="max-tokens" />
            <NumberInputIncrement />
          </NumberInputGroup>
        </NumberInput>
      </div>
    </div>
  )
}

export { UiSdkNumberInputStep }
```

## Props in this example

### NumberInput

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `defaultValue` | `number \| null` | – |  |
| `min` | `number` | – |  |
| `max` | `number` | – |  |
| `step` | `number` | `1` |  |
| `largeStep` | `number` | `step × 10` |  |
| `smallStep` | `number` | `step ÷ 10` |  |

### NumberInputControl

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `id` | `string` | – |  |

## More Number input examples

- [Min and max](https://hextaui.com/docs/ui-sdk-number-input/examples/min-max)
- [Currency, percent and units](https://hextaui.com/docs/ui-sdk-number-input/examples/format)
- [Locale](https://hextaui.com/docs/ui-sdk-number-input/examples/locale)
- [Scrub](https://hextaui.com/docs/ui-sdk-number-input/examples/scrub)
- [Mouse wheel](https://hextaui.com/docs/ui-sdk-number-input/examples/wheel)
- [Controlled](https://hextaui.com/docs/ui-sdk-number-input/examples/controlled)
- [Form](https://hextaui.com/docs/ui-sdk-number-input/examples/form)
- [Invalid](https://hextaui.com/docs/ui-sdk-number-input/examples/invalid)
- [Disabled](https://hextaui.com/docs/ui-sdk-number-input/examples/disabled)
- [Read-only](https://hextaui.com/docs/ui-sdk-number-input/examples/read-only)
- [Right to left](https://hextaui.com/docs/ui-sdk-number-input/examples/rtl)
