Skip to main content

Toggle

shadow

Toggle elementy sú malé interaktívne ovládacie prvky, ktoré umožňujú prepínať medzi dvoma stavmi. Môžete ich aktivovať kliknutím myši. Najčastejšie sa používajú na aktiváciu a deaktiváciu funkcionalít prípadne na prepínanie medzi zobrazením a skrytím iných elementov.

Basic Usage

Colors

Atribúty a Vlastnosti

checked

DescriptionAk true, toggle je aktivovaný.
Attributechecked
Typeboolean
Defaultfalse

color

DescriptionFarba, ktorá sa má použiť z palety farieb vašej aplikácie. Predvolené možnosti sú: "primary", "success", "warning", "danger", "complete", a "dark". Pre viac informácií o farbách navštívte Základy prispôsobenia.
Attributecolor
Type"complete" | "danger" | "dark" | "primary" | "success" | "warning" | string | undefined
Defaultundefined

disabled

DescriptionAk true, s toggle elementom nie je možné interagovať.
Attributedisabled
Typeboolean
Defaultfalse

name

DescriptionDefinuje name atribút, ktorý je dôležitý napríklad pri použití vo formulároch.
Attributename
Typestring
Defaultthis.inputId

Eventy

NameDescription
changeVyvolaný pri zmene stavu elementu.

Metódy

No public methods available for this component.

CSS Shadow Parts

NameDescription
inputOdkazuje na input element typu checkbox
toggleOdkazuje na vnútorný div obaľovací element

CSS Custom Vlastnosti

NameDescription
--wj-toggle-border-radiusBorder radius of the toggle track
--wj-toggle-color-baseBackground of the toggle handle
--wj-toggle-handle-border-radiusBackground of the toggle handle when checked
--wj-toggle-handle-colorBorder radius of the toggle handle
--wj-toggle-handle-heightBox shadow of the toggle handle
--wj-toggle-handle-shadowHeight of the toggle handle
--wj-toggle-handle-shadow-checkedMaximum height of the toggle handle
--wj-toggle-handle-widthHorizontal spacing around the toggle handle
--wj-toggle-heightTransition of the toggle handle
--wj-toggle-widthWidth of the toggle handle

Sloty

NameDescription
``Predvolené umiestnenie obsahu elementu.