Skip to main content

Slider

shadow

Element Slider je interaktívny komponent posuvníka, ktorý umožňuje používateľom praktickým spôsobom vybrať hodnotu z rozsahu hodnôt. Ponúka handle (rukoväť), ktorou možno pohybovať, takže je ideálny pri tých scenároch, ktoré od používateľa vyžadujú číselný vstup alebo úpravu nejakého nastavenia, napríklad hlasitosti.

Základné použitie

V predvolenom nastavení výber umožňuje používateľovi vybrať len jednu možnosť. Zahrnutím elementu Icon sa pri možnosti zobrazí aj zvolená ikona.

Bubble

Pridaním atribútu bubble sa nad sliderom zobrazí bublina s číslom vyjadrujúcim aktuálnu hodnotu posuvníka.

Label

Icons

Color

Atribúty a Vlastnosti

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

Eventy

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.

Metódy

No public methods available for this component.

CSS Shadow Parts

NameDescription
sliderRefers to input inside the element.

CSS Custom Vlastnosti

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.

Sloty

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.