Switch

Toggle switch input.

Usage

TSX
import { Label, Switch } from "@aeontel/ui";

<div className="flex items-center gap-2">
  <Switch id="notifications" checked={on} onCheckedChange={setOn} />
  <Label htmlFor="notifications">Email notifications</Label>
</div>;

Exports

Switch

On / off toggle switch.

TypeScript
Switch(props: SwitchPrimitive.Root.Props & Pick<SwitchBaseProps, "size">): JSX.Element

Props

PropTypeDefaultDescription
size?"default" | "sm" | undefined"default"