ToggleButton

A standard toggle button for toggling between two states

Props

NameTypeDescription
value
boolIs the toggle toggled?
onChange
funcA function to call when toggled
label
stringA label to display next to the toggle button
theme
enumThe overall visual theme of the button ('default' | 'orange' | 'green' | 'orangeToGreen')
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" />