Skip to content

Data Input

Switch

On/off control with label.

import { Switch } from '@var-ui/react';

Switch

On/off control with label.

Examples

Default

Demo.tsxTSX
import { Switch } from '@var-ui/react';

<Switch>Enable notifications</Switch>

Sizes

size (sm, md, lg) scales the track, the thumb, the label type and the gap. It falls back to the surrounding control size (InputGroup, Toolbar, Select.Root), then md.

Props

Accessibility

Built on React Aria Components where applicable.