Toggle
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
Description | If true , toggle is activated. |
Attribute | checked |
Type | boolean |
Default | false |
color
Description | The 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. |
Attribute | color |
Type | "complete" | "danger" | "dark" | "primary" | "success" | "warning" | string | undefined |
Default | undefined |
disabled
Description | If true , the toggle element cannot be interacted with. |
Attribute | disabled |
Type | boolean |
Default | false |
name
Description | Defines a name attribute that is important, for example, when used in forms. |
Attribute | name |
Type | string |
Default | this.inputId |
Eventy
Name | Description |
---|---|
change | Invoked when the state of the element changes. |
Metódy
No public methods available for this component.
CSS Shadow Parts
Name | Description |
---|---|
input | Refers to an input element of type checkbox |
toggle | Refers to the inner div wrapping element |
CSS Custom Vlastnosti
Name | Description |
---|---|
--wj-toggle-border-radius | Border radius of the toggle track |
--wj-toggle-color-base | Background of the toggle handle |
--wj-toggle-handle-border-radius | Background of the toggle handle when checked |
--wj-toggle-handle-color | Border radius of the toggle handle |
--wj-toggle-handle-height | Box shadow of the toggle handle |
--wj-toggle-handle-shadow | Height of the toggle handle |
--wj-toggle-handle-shadow-checked | Maximum height of the toggle handle |
--wj-toggle-handle-width | Horizontal spacing around the toggle handle |
--wj-toggle-height | Transition of the toggle handle |
--wj-toggle-width | Width of the toggle handle |
Sloty
Name | Description |
---|---|
`` | Default location of the element content. |