A
Auralix UI

Switch

A toggle switch control with a liquid glass aesthetic.

Preview

Installation

bash
npx auralix-ui add switch

Usage

Basic Switch

tsx
import { Switch } from "@/components/ui/Switch";
import { useState } from "react";

const [checked, setChecked] = useState(false);

<Switch checked={checked} onCheckedChange={setChecked} />

Props

NameTypeDefaultDescription
checkedbooleanfalseThe controlled checked state.
onCheckedChange(checked: boolean) => void-Event handler called when the state changes.
classNamestring-Additional class names.

Variants

iOS
Material
Cyber