# QuantityStepper

> A − count + control for how many of something a cart holds, where each button is a form post naming the new count, so it works without script and the server stays the source of truth.

```ts
import { QuantityStepper } from "@sdxc/ui/commerce";
```

Renders the stepper as a pill-shaped form of two submit buttons around the count.

## Examples

```tsx
<QuantityStepper action="/cart/line" value={2} fields={{ line: "0" }} labels={{ fewer: "One fewer taco", more: "One more taco", remove: "Remove taco", count: "2 tacos" }} />
```

## Props

| Prop | Type | Description |
| --- | --- | --- |
| `action` | `string` | Where the form posts. |
| `value` | `number` | The count now. |
| `name?` | `string` | The field the new count posts as. @default "qty" |
| `max?` | `number` | The most the count may reach; + is disabled there. @default 99 |
| `fields?` | `Record<string, string>` | Hidden fields the post carries, such as the line's index and the page to return to. |
| `labels` | `Labels` |  |

Also accepts everything in `Omit<TagProps<"form">, "children" | "method">`.

