Skip to content
caliper ui pro docs

Adaptive stepper

A quantity control that is a button at zero and a stepper above it.

Pro

Guests

Casa Alfama, Lisbon · 14 to 17 November · up to 6

Adults13 and over
ChildrenUnder 13

When to use

  • Cart lines and guest counts that start at none.
  • Small integer quantities with a maximum.

When not to use

  • The value can be large or typed; use a number field.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/adaptive-stepper

Adds its 4 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

API reference

AdaptiveStepper

10 props
PropTypeDefault
labelstring"Quantity"
valuenumber—
defaultValuenumber0
minnumber0
maxnumber10
stepnumber1
disabledboolean—
namestring—
onValueChange((value: number) => void)—
classNamestring—

Keyboard

↑
Moves to the previous item or value.
→
Moves to the next item or value.
↓
Moves to the next item or value.
←
Moves to the previous item or value.
Home
Jumps to the first item or the minimum.
End
Jumps to the last item or the maximum.

Accessibility

It exposes group and spinbutton semantics, with aria-label, aria-disabled, aria-hidden, aria-valuenow, aria-valuemin and aria-valuemax kept in step with state.

Notes for AI

Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.

/docs/components/adaptive-stepper.md

The index of every part is at /llms.txt.

More in Inputs