Switch
An input that switches between an on and off state.
Importing
1
import { Switch } from '@infinityfx/fluid';Usage
With icons
API reference
Switch Props
size?
'xsm' | 'sml' | 'med' | 'lrg'
'med'
color?
string
Custom accent color for the switch when checked.
round?
boolean
true
error?
any
Marks the switch as invalid when truthy.
iconOn?
React.ReactNode
Icon shown in the on/checked position.
iconOff?
React.ReactNode
Icon shown in the off/unchecked position.
disabled?
boolean
false