Switch

A control that can be toggled on or off.
Properties
checked
Example
Source Code
Installation
"use client";

import React from "react";
import { Switch } from "@/subframe/components/Switch";

function SwitchExample() {
  return <Switch />;
}

export default SwitchExample;

Props

Switch
Thumb
Prop
Type
Default
Additional info
onCheckedChange
(checked: boolean) => void
Handler called when switch is turned on or off.

Examples

Controlled

Use checked and onCheckedChange props to control the switch state.