Switch
Toggles a setting with immediate effect.
Staticimport { Switch } from 'umbra-ui'
Props
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | Inline label. When present the root element is a `<label>` that receives `className`; other props go to the control. |
size | "sm" | "md" | md | Track size. |
Usage notes
For settings that apply immediately. Use Checkbox when the change is submitted later.
Accessibility
role="switch"witharia-checked; Space and Enter toggle.- State is shown by thumb position and colour, not colour alone.
Import
import { Switch } from 'umbra-ui';
import 'umbra-ui/styles.css'; // once, at the root of your app