logoRuru UI

Switch

The Switch component is used to toggle between two states.

Installation

npx ruru-ui-cli@latest add switch

Usage

Variants

Disabled Switch

Props

NameTypeDefaultDescription
classNamestring"" Additional class names for the switch.
disabledbooleanfalseFlag to disable the switch.

Examples

Switch with lables

Default Checked Switch

onCheckedChange function

false

On this page