Skip to content

Components

Toggle

An on/off switch.

Import

import { Toggle } from '@rinzai/zen';

API reference

<Toggle>

On/off switch. A native checkbox with the switch role underneath, so forms and screen readers work as they do for any checkbox. Space and Enter both flip it (Enter doesn't submit a surrounding form), as for a switch button.

PropTypeDefault
onCheckedChange
((checked: boolean) => void)—