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.
checkedboolean—Controlled checked state.
onCheckedChange(checked: boolean) => void—Callback when toggled.
labelstring—Label text next to the toggle.

Examples