Inputs & Forms
Switch
client38.5 kB
@stellaria/nebula-webSwitchPropsPreview
Props
10| Prop | Type | Default |
|---|---|---|
checked | boolean | — |
color | ColorExtended | — |
defaultChecked | boolean | false |
disabled | boolean | — |
draggable | boolean | true |
label | ReactNode | — |
onChange | ((checked: boolean) => void) | — |
rootClassName | string | — |
size | Size | — |
value | string | — |
Slot props
2Each one spreads over an inner element, so you can restyle a region without forking the component.
| Prop | Type | Default |
|---|---|---|
indicatorProps The track. The thumb is NOT exposed: motion moves it with a computed style. | BoxSlotProps | — |
labelProps Label next to the switch. | TextSlotProps | — |
Also accepts
On top of its own props, this component forwards these groups.
HTML attributes · 300Style props · 127