Switch
One choice among a few, as a pill track. A radio group underneath: keyboard, forms and screen readers treat it as one. For many choices, use a select.
| Class | Effect | Type |
|---|---|---|
.switch | The track. | root |
.switch-primary.switch-neutral.switch-info.switch-success.switch-warning.switch-error | Sets color, one class per value. | axis color |
.switch-xs.switch-sm.switch-md.switch-lg.switch-xl | Sets size, one class per value. | axis size |
.switch-block | Written by the block prop. | flag |
.switch-indicator | Drawn by the component; you never opt into it. | part |
.switch-input | The radio, laid invisibly over its label. | part |
.switch-item | One label; filled when its radio is checked. | part |