Skip to main content

Slider

Slider | Element extends the capabilities of the standard HTML select element. shadow

Element Slider is an interactive slider component that allows users to select a value from a range of values in a convenient way. It features a handle that can be moved, making it ideal for those scenarios that require the user to provide numeric input or adjust some setting such as volume.

Basic Usage

By default, the selection allows the user to select only one option. Including the Icon element will also display the selected icon next to the option.

Bubble

Adding the bubble attribute will display a bubble above the slider with a number representing the current value of the slider.

Label

Icons

Color

Attributes and Properties

max

DescriptionDefines the maximum value of the slider.
Attributemax
Typenumber | undefined
Defaultundefined

min

DescriptionDefines the minimum value of the slider.
Attributemin
Typenumber | undefined
Defaultundefined

step

DescriptionDefines the interval between each slider value.
Attributestep
Typenumber | undefined
Defaultundefined

value

DescriptionDefines the current value of the slider.
Attributestep
Typenumber | undefined
Defaultundefined

Events

NameDescription
wj:slider-changeCalled up when the slider value is changed.
wj:slider-initCalled after the initial slider load.
wj:slider-moveInvoked after moving the slider handle.

Methods

No public methods available for this component.

CSS Shadow Parts

NameDescription
sliderRefers to input inside the element.

CSS Custom Properties

NameDescription
--wj-slider-colorDefines the colour of the slider.
--wj-slider-thumb-colorDefines the color of the slider handle.
--wj-slider-thumb-shadowDefines the box-shadow handles of the slider.
--wj-slider-thumb-shadow-activeDefines the box-shadow of the slider handle in the active state.
--wj-slider-track-colorDefines the color of the slider's sliding path.
--wj-slider-track-heightDefines the height of the slider travel.

Slots

NameDescription
endThe content is placed on the right in the LTR and on the left in the RTL.
labelThe content is placed to the right of the slider path in LTR and to the left in RTL.
startThe content is placed on the left in the LTR and on the right in the RTL.