nori-ui

Switch

Binary on/off toggle with controlled and uncontrolled modes.

At a glance

  • Renders with role="switch" on web; maps to RN <Switch> on native.
  • Controlled via checked or uncontrolled via defaultChecked.

Web preview

Native preview

Props

PropTypeDefaultDescription
checkedbooleanControlled value
defaultCheckedbooleanfalseUncontrolled initial value
onCheckedChange(checked: boolean) => voidChange handler
disabledbooleanfalseDisables interaction
labelstringVisible label tied via aria
asChildbooleanfalseRenders the supplied child as root

On this page