ToggleButton

A standard toggle button for toggling between two states

Props

NameTypeDescription
value
booleanIs the toggle toggled?
onChange
FunctionA function to call when toggled
label
stringA label to display next to the toggle button
theme
'default' | 'orange' | 'green' | 'orangeToGreen'The overall visual theme of the button
className
stringA className to pass down

ToggleButton

A standard ToggleButton
<ToggleButtonDemo />

With orange theme

A ToggleButton with an orange theme
<ToggleButtonDemo theme="orange" />

With green theme

A ToggleButton with an green theme
<ToggleButtonDemo theme="green" />

With orange-to-green theme

This theme toggles between orange to green.
<ToggleButtonDemo theme="orangeToGreen" />

With label

A label can be passed through to display next to the button
<ToggleButtonDemo label="User status" />