Design systém gov.cz4.7.1

gov-form-switch ​

Properties ​

PropertyAttributeDescriptionTypeDefault
checkedcheckedSwitch button statebooleanfalse
disableddisabledMakes the switch component disabled.booleanfalse
identifieridentifierCustom switch identifier.stringundefined
invalidinvalidIndicates the entered value does not conform to the format expected by the application.booleanundefined
namenameName of the switch.stringundefined
noLabelno-labelWhen you can't use the form label.booleanfalse
requiredrequiredSet whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.booleanfalse
sizesizeSwitch's size."l" | "m" | "s" | "xl" | "xs""m"
valuevalueValue of switchstringundefined

Events ​

EventDescriptionType
gov-blurEmitted when the switch loses focus.CustomEvent<FormSwitchEvent>
gov-changeEmitted when the switch change value.CustomEvent<FormSwitchEvent>
gov-focusEmitted when the switch has focus.CustomEvent<FormSwitchEvent>

Methods ​

getRef() => Promise<HTMLInputElement> ​

Returns the reference of the native element

Returns ​

Type: Promise<HTMLInputElement>

Dependencies ​

Used by ​

Depends on ​

Graph ​


Built with StencilJS