bit Bheadless

Slider

Pick a value — or a range with several thumbs — within a minimum and maximum, by pointer or keyboard.

Implementation: CSS Tailwind

Single value

Follows the WAI-ARIA Slider pattern: each BitBhSliderThumb is a role="slider" with aria-valuenow/min/max. Click or drag anywhere on the track, or focus the thumb and use the arrow keys (± Step), PageUp / PageDown or Shift+arrows (± LargeStep) and Home / End.

Volume: 50

Range with two thumbs

Bind @bind-Values and render one thumb per value (Multi-Thumb Slider pattern). Thumbs can't cross; MinStepsBetweenThumbs keeps them apart. ValueText formats aria-valuetext so screen readers hear "$200" instead of "200". BitBhSliderRange fills the span between the thumbs.

Price: $200 – $600

Step, LargeStep and a thumb Template

Step="0.5" snaps values to half degrees; LargeStep="5" sets the PageUp / PageDown / Shift+arrow jump (default: a tenth of the range). BitBhSliderThumb's Template receives the thumb's value — used here for a value bubble.

21.5°

Target: 21.5 °C

Vertical orientation

Orientation="BitBhOrientation.Vertical" measures the pointer along the height and sets aria-orientation; ↑ / → increase, ↓ / ← decrease. Each band is uncontrolled via DefaultValue, with a negative Min.

In a field, with OnValueCommit

Inside a BitBhField the thumb is labelled by BitBhLabel (aria-labelledby) and described by BitBhDescription; clicking the label focuses the thumb. @bind-Value updates live while dragging, whereas OnValueCommit fires once on pointer up or per key press — the place to save.

Saved when you release the thumb or press a key.

Live: 70% · Committed: 70%

Disabled

Disabled="true" ignores pointer and keys, takes the thumbs out of the tab order (tabindex="-1", aria-disabled="true") and adds data-disabled to every part. The range below is uncontrolled via DefaultValues.

An unhandled error has occurred. Reload 🗙