List
Icons
Pass icons as ReactNode
to the inactiveChild
and activeChild
props respectively.
Icons
Apply the compact
prop define a width
for a minimal display.
Lightswitch
This is a full fledge example using multiple features.
API Reference
Switch
Property | Type | Description |
---|---|---|
id * | string | |
name * | string | |
checked | boolean | |
disabled | boolean | |
compact | boolean | |
labelledby | string | |
describedby | string | |
base | string | |
stateInactive | string | |
stateActive | string | |
stateDisabled | string | |
width | string | |
height | string | |
padding | string | |
rounded | string | |
hover | string | |
classes | string | |
thumbBase | string | |
thumbInactive | string | |
thumbActive | string | |
thumbRounded | string | |
thumbTranslateX | string | |
thumbTransition | string | |
thumbEase | string | |
thumbDuration | string | |
thumbClasses | string | |
iconInactiveBase | string | |
iconActiveBase | string | |
onChange | object | |
inactiveChild | React.ReactNode | |
activeChild | React.ReactNode | |