Counter Input

Accessible increment / decrement stepper for numeric values. Used for guest counts, bedroom selectors, and similar booking fields. Supports min, max, step, and compact density.

core/counter-input

Installation

1 · Add registry to components.json

2 · Install component

Examples

Default

Adults / children counters with min / max constraints.

API Reference

PropTypeDescription
valuereq
numberControlled numeric value.
onChangereq
(value: number) => voidCalled when the value changes.
labelreq
stringDisplay label for the counter row.
description
stringOptional sub-label (e.g. age range).
min
numberMinimum value. Decrement is disabled at this bound.
max
numberMaximum value. Increment is disabled at this bound.
step
numberIncrement / decrement step.
disabled
booleanDisables both buttons.
density
"default" | "compact"Visual density — compact reduces size and spacing.
className
stringAdditional classes applied to the container div.