Toggle
Overview
When to use
Use the Toggle component for situations where users need to switch between two distinct states (e.g., on/off, enabled/disabled, show/hide).
When to consider an alternative
t.b.d.
Component
Default
Set state
Controlled Toggle
States
Properties
Default
Property | Type | Required | Default | Description |
---|---|---|---|---|
utilClassNames | String | false | - | |
children | Node | false | - | |
toggleRef | Shape {
"current": "Any"
} | false | - | |
value | Enum "ON" │ "OFF" │ "NEUTRAL" | false | - | Exported as Toggle.Value.ON etc. |
onChange | Func | false | - | |
leftIcon | Node | false | - | |
rightIcon | Node | false | - | |
id | String | false | - | |
name | String | false | - | |
error | Bool | false | - | |
disabled | Bool | false | - |