Skip to content
bahtuiv0.18.8

<baht-range>

Range slider. Controlled.

Basic

<baht-range value="40" label="Volume"></baht-range>

Stepped

show-value defaults on; show-value="false" turns the readout off.

<baht-range value="50" min="0" max="200" step="25" label="Budget"></baht-range>

In a form schema, type: 'range' renders this element in field mode: field label / help / error, bounds from min / max / step (default 0 / 100 / 1), and baht-input with a number, debounced while sliding and sent at once on release. Untouched (null) parks the thumb at min and reads “—”. The engine and bank20baht-validator enforce the bounds (defaults included) and the step grid counted from min (“Use steps of 5”).

{ "order": 4, "type": "range", "key": "budget", "label": "Monthly budget", "min": 0, "max": 20000, "step": 500 }
NameTypeDefaultDescription
valuenumber0Current value
minnumber0Minimum
maxnumber100Maximum
stepnumber1Step
labelstring''Label above the slider
show-valuebooleantrueShow the numeric bubble
fieldJSFieldDescriptor—
disabledbooleanfalseDisable
readonlybooleanfalse
requiredbooleanfalse
show-optionalbooleanfalseAppend the localized "(optional)" marker to the label when not required (set by <baht-form show-optional>).
errorJSstring | nullnull
debouncenumber | undefined—Debounce for typed edits (ms); unset = BahtFieldBase.defaultDebounce.
EventdetailDescription
baht-change{ value }Value changed
baht-inputCustomEventField mode: the slider moved. `detail: { key, value }`.
nameCustomEvent