Switch: API Table
class: LionSwitch, lion-switch
Fields
| Name | Privacy | Type | Default | Description | Inherited From |
|---|---|---|---|---|---|
checked | public | boolean | false | ||
slots | public | ||||
_feedbackConditionMeta | protected | LionField | |||
_focusableNode | protected | LionField | |||
_inputNode | protected | LionSwitchButton | Input node here is the lion-switch-button, which is not compatible with LionField _inputNode —> HTMLInputElement Therefore we do a full override and typecast to an intersection type that includes LionSwitchButton |
Methods
| Name | Privacy | Description | Parameters | Return | Inherited From |
|---|---|---|---|---|---|
clear | public | Clears modelValue. Interaction states are not cleared (use resetInteractionState for this) | LionField | ||
reset | public | Resets modelValue to initial value. Interaction states are cleared | LionField | ||
resetInteractionState | public | LionField | |||
_groupOneTemplate | protected | ||||
_groupTwoTemplate | protected | ||||
_isEmpty | protected | Override this function from ChoiceInputMixin. | |||
_onChange | protected | Dispatches custom bubble event | ev: Event= | LionField | |
_onLabelClick | protected | ||||
_syncButtonSwitch | protected | ||||
_toggleChecked | protected | Override this function from ChoiceInputMixin. | ev: Event |
Events
| Name | Type | Description | Inherited From |
|---|---|---|---|
user-input-changed | Event | LionField |
class: LionSwitchButton, lion-switch-button
Fields
| Name | Privacy | Type | Default | Description | Inherited From |
|---|---|---|---|---|---|
checked | public | boolean | false | ||
readOnly | public | boolean | false | ||
value | public | string | '' |
Methods
| Name | Privacy | Description | Parameters | Return | Inherited From |
|---|---|---|---|---|---|
_handleKeydown | protected | ev: KeyboardEvent | |||
_handleKeyup | protected | ev: KeyboardEvent | |||
_toggleChecked | protected |
Events
| Name | Type | Description | Inherited From |
|---|---|---|---|
checked-changed | Event |
Attributes
| Name | Field | Inherited From |
|---|---|---|
checked | checked | |
readonly | readOnly |