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

DescriptionIf true, toggle is activated.
Attributechecked
Typeboolean
Defaultfalse

color

DescriptionThe color to use from your application's color palette. The default options are "primary", "success", "warning", "danger", "complete", and "dark". For more information on colors, visit Customization Basics.
Attributecolor
Type"complete" | "danger" | "dark" | "primary" | "success" | "warning" | string | undefined
Defaultundefined

disabled

DescriptionIf true, the toggle element cannot be interacted with.
Attributedisabled
Typeboolean
Defaultfalse

name

DescriptionDefines a name attribute that is important, for example, when used in forms.
Attributename
Typestring
Defaultthis.inputId

Eventy

NameDescription
changeInvoked when the state of the element changes.

Metódy

No public methods available for this component.

CSS Shadow Parts

NameDescription
inputRefers to an input element of type checkbox
toggleRefers to the inner div wrapping 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
``Default location of the element content.