Skip to content

Slider

The bq-slider component is a range slider input with optional visible value display.

Basic Usage

html
<bq-slider label="Volume" value="50"></bq-slider>

Show Value

html
<bq-slider label="Brightness" value="75" show-value></bq-slider>

Custom Range

html
<bq-slider label="Price" min="0" max="1000" step="50" value="250"></bq-slider>

Disabled

html
<bq-slider label="Locked" value="30" disabled></bq-slider>

Properties

PropertyTypeDefaultDescription
valuenumber50Current value
minnumber0Minimum value
maxnumber100Maximum value
stepnumber1Step increment
labelstringAccessible label
disabledbooleanfalseDisables the slider
show-valuebooleanfalseDisplays the current value as text

Events

EventDetailDescription
bq-input{ value: number }Fired on each drag or keystroke
bq-change{ value: number }Fired on value commit

CSS Parts

PartDescription
wrapperThe outer wrapper
labelThe label text
valueThe value display text
inputThe native range input

Accessibility

  • aria-valuemin, aria-valuemax, and aria-valuenow reflect the min, max, and current value.
  • The live value display uses aria-live="polite" for screen reader announcements.

Form Participation

The component creates a hidden input proxy for native <form> submission.

Released under the MIT License.