# NumberField

A bounded numeric stepper that survives decimals and repeated actions.

- Family: Forms, imported from `mizu-ui` or `mizu-ui/forms`
- Docs: https://mizu.user64bit.world/components/number-field
- Source: https://github.com/0xuser64bit/mizu/blob/main/packages/mizu/src/forms/Selection.tsx

## Usage

```tsx
"use client";

import { useState } from "react";
import { NumberField } from "mizu-ui";

export function Example() {
  const [value, setValue] = useState(3);
  return (
    <NumberField
      label="Seats"
      value={value}
      onValueChange={setValue}
      min={1}
      max={12}
    />
  );
}
```

## Copy it with the shadcn CLI

```sh
npx shadcn@latest init 0xuser64bit/mizu/preset # once, where there is no components.json
npx shadcn@latest add 0xuser64bit/mizu/number-field
```

## Props

- `value / onValueChange`: `number / function`. Controlled numeric value.
- `min / max`: `number`. Inclusive bounds.
- `step`: `number` (default `1`). Increment size.

## Accessibility

A labelled native number input plus named increase/decrease buttons. Bounds disable impossible actions.

## Motion

CSS transitions explain state changes. Reduced motion removes travel.
