Skip to content

RangeField

A slider input for selecting a numeric value within a range. The current value is displayed next to the slider for immediate feedback.

PropTypeDefaultDescription
value(instance: TCommand) => unknownRequired. Accessor function returning the property value from the command instance.
titlestringThe label for the field.
minnumber0Minimum value of the range.
maxnumber100Maximum value of the range.
stepnumber1Increment step size.
requiredbooleanOverride automatic required detection.
<RangeField<AudioCommand>
value={c => c.volume}
title="Volume"
min={0}
max={100}
step={1}
/>
<RangeField<UserCommand>
value={c => c.experience}
title="Years of Experience"
min={0}
max={50}
step={1}
/>