R

Switch

1 parts

Anatomy

Import the parts and compose them. Each part forwards attributes to its underlying element.

vue
import {
  Switch,
} from '@robonen/primitives/switch';

<Switch />

API Reference

Switch

Root
PropTypeDescription
truthy?TValue representing the "on" state. Defaults to `true`.
falsy?TValue representing the "off" state. Defaults to `false`.
defaultValue?TInitial uncontrolled value. Defaults to `falsy`.
disabled?boolean
required?boolean
name?stringName for the hidden form input. If provided, a hidden input mirrors state.