Toggle is a switcher for Boolean value. The component supports required field and custom validation.
name
string
Component name
value
boolean
Current component value
valid
Indicates if the component is valid
validating
Indicates if the component is validating
disabled
Indicates whether the component is disabled
setValue
value: boolean
void
Set component value
setDisabled
disabled: boolean
Disable or enable the component
reset
β
Reset component to the inital value
validate
Trigger component validation
resetValidation
Clear validation errors
setErrors
errors: string |
string[] | null
Mark the component as invalid and display errors
setRequired
required: boolean
Set component required state
On Init
Triggered when the component is initialized
On Change
Triggered when the component's state changes
On Focus
Triggered when the component is in focus
On Blur
Triggered when the component loses focus
Last updated 4 months ago
Was this helpful?