Skip to main content

Slider

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​

The sample adds a label to the slider to make it clear to the user the meaning of the value or range.

;

Icons​

The preview adds icons to the slider to help visually mark the beginning and end of the range.

Color​

The demonstration compares the colour variants of the slider and their legibility in different meaning states.

When to use​

Use wje-slider when the user enters a value, selects options, or performs an action on a form.

When not to use​

Don't just use it as a visual decorative element without interaction. In this case, give priority to the presentation components.

Accessibility​

Always link the component to the description (label/aria-label), keep keyboard control, and display a clear message on validation errors.

  • Keep validation rules and error states consistent across the entire form.
  • For asynchronous operations, display the load status or disabled status.
  • For complex forms, prefer smaller sections and immediate feedback.

Attributes and properties​

bubble​

PopisUrčuje, či sa pri slidri zobrazí bublina s hodnotou.
Atribútbubble
Typany
Predvolené-

disabled​

PopisVypína používateľskú interakciu s komponentom.
Atribútdisabled
Typboolean
Predvolené-

max​

PopisNastavuje maximálnu povolenú hodnotu.
Atribútmax
Typnumber
Predvolené100

min​

PopisNastavuje minimálnu povolenú hodnotu.
Atribútmin
Typnumber
Predvolené0

step​

PopisNastavuje číselnú hodnotu používanú vo voľbe step.
Atribútstep
Typnumber
Predvolené1

value​

PopisNastavuje aktuálnu hodnotu komponentu.
Atribútvalue
Typnumber
Predvolené0

Events​

NázovPopis
wje-slider:initVyvolá sa pri odoslaní udalosti wje-slider:init.
wje-slider:moveVyvolá sa pri odoslaní udalosti wje-slider:move.
wje-slider:changeVyvolá sa pri zmene hodnoty komponentu.

Methods​

getPercentage​

PopisVráti percentage z aktuálneho stavu komponentu.
Signatúra(min: number, max: number, value?: number) => number

CSS shadow parts​

Pre tento komponent nie sú dostupné žiadne CSS časti tieňa.

CSS custom variables​

Pre tento komponent nie sú dostupné žiadne vlastné CSS vlastnosti.

Slots​

Pre tento komponent nie sú dostupné žiadne sloty.