Components

Switch

A binary on/off toggle for settings that take effect immediately.

Disabled

Usage

import { Switch, Label } from '@onersoft/design-system'

<Switch id="notifications" defaultChecked onCheckedChange={setOn} />
<Label htmlFor="notifications">Notifications</Label>

Props

Switch mirrors Radix Switch.Root.

PropTypeDefault
checkedboolean
defaultCheckedboolean
onCheckedChange(checked) => void
disabledbooleanfalse

On this page