Switch
A toggle switch control with a liquid glass aesthetic.
Preview
Installation
bash
npx auralix-ui add switchUsage
Basic Switch
tsx
import { Switch } from "@/components/ui/Switch";
import { useState } from "react";
const [checked, setChecked] = useState(false);
<Switch checked={checked} onCheckedChange={setChecked} />Props
| Name | Type | Default | Description |
|---|---|---|---|
checked | boolean | false | The controlled checked state. |
onCheckedChange | (checked: boolean) => void | - | Event handler called when the state changes. |
className | string | - | Additional class names. |
Variants
iOS
Material
Cyber
On this page