Umbra UI

Switch

Toggles a setting with immediate effect.

Staticimport { Switch } from 'umbra-ui'

Props

PropTypeDefaultDescription
children ReactNode—Inline label. When present the root element is a `<label>` that receives `className`; other props go to the control.
size "sm" | "md"mdTrack size.

Usage notes

For settings that apply immediately. Use Checkbox when the change is submitted later.

Accessibility

  • role="switch" with aria-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