Switch
The <Switch />
component behaves almost identically to <Checkbox />
and can be clearer indicator of settings that can be toggled.
import { Switch } from 'minerva-ui';
Switch with size variant
Switch with size and color variant
Props
These are props related to the Switch component.
Name | Type | Is Required | Default | Description |
---|---|---|---|---|
disabled | string | optional | 10px | Space between items in stack |
switchSize | 'sm', 'md', 'lg' | optional | md | Size of switch |
switchColor | string | optional | #5850ec | Color of inner switch when selected |
checked | boolean | optional | false | Sets if switch is selected |
htmlFor | string | required | none | Sets label of switch |
onChange | function | optional | none | Action to take when state of switch changes |
style | style props | optional | none | CSS style props |