Imagine ArtImagine Art

A switch control for toggling between two states like on/off or enabled/disabled.

Forms

Import

import { Toggle } from "@/components/ui"

API

PropTypeDefaultDescription
size"sm" | "md" | "lg""md"Switch dimensions.
checkedbooleanControlled checked state.
onCheckedChange(checked: boolean) => voidCallback when toggled.
labelstringLabel text next to the toggle.

Examples