ComponentsLumos 0.0.2NewOpen component

Range

A slider for a number, with the value shown as it moves.

A range is the right control when the rough size of the number matters more than its exact value — a budget, a distance, a weighting. Range shows the number as the handle moves, so the reader is never guessing where they have landed.

astro
<Range label="Budget" min={0} max={10000} step={500} unit="$" />

Props

PropTypeDefaultWhat it does
renderbooleantrueSet to false to skip this component and everything inside it.
labelstringNoneThe text above the track.
valuenumberNoneWhere the handle starts. Defaults to halfway between min and max.
minnumber0The lowest it goes.
maxnumber100The highest it goes.
stepnumber1How far it moves at a time.
unitstringNoneWhat the number is measured in, shown after it.
namestringNoneThe name it submits under. Taken from the label where it is not set.
requiredbooleanfalseMarks the field as needed, and stars its label.