Range Input

Dual min / max numeric input for bounded ranges — price per night, size, distance, nights. Each field coerces on blur and clamps to floor / ceiling. A unit suffix (e.g. "$", "km") renders inside the inputs. Supports custom display formatters.

core/range-input

Installation

1 · Add registry to components.json

2 · Install component

Examples

Default

Price range, distance, no-label, and disabled examples.

API Reference

PropTypeDescription
valuereq
RangeValueControlled { min?, max? } range.
onChangereq
(value: RangeValue) => voidCalled when either bound changes (on blur).
floor
numberAbsolute lower bound. The min field cannot go below this.
ceiling
numberAbsolute upper bound. The max field cannot exceed this.
step
numberStep for the HTML number inputs.
unit
stringUnit suffix rendered inside each field (e.g. "$", "km").
label
stringOptional label rendered above the inputs.
formatValue
(v: number) => stringCustom display formatter. Applied to the field value when not focused.
disabled
booleanDisables both inputs.