"use client"; import React from "react"; import { Switch } from "@/subframe/components/Switch"; function SwitchExample() { return <Switch />; } export default SwitchExample;
onCheckedChange
(checked: boolean) => void
Use checked and onCheckedChange props to control the switch state.
checked
View code