Switch
Switches toggle the state of a single item on or off. material.io
Importing
1 2 3 4 5 6 7 8 |
|
Props
Name | Default | Possible Values | Type | Description |
---|---|---|---|---|
color | none |
none , primary , secondary |
string | Sets the color of the button. |
labelPosition | after |
before , after |
string | Sets which comes first, the label or the switch. |
waves | true |
Boolean value | boolean | Sets weather or not the switch should have a ripple/waves effect when interacted with. |
Note
Props other than those listed above such as className
and style
will be passed directly to the <input/>
element.