Y2K UI

Switch

A flat toggle — pastel mint track when on, white when off, with a lemon knob that has a thick navy border.

switch-demo.app

Installation

terminal.sh
npx y2kui add switch

Usage

import { Switch } from "@/components/ui/switch";

Props

PropTypeDefaultDescription
checkedboolean—Controlled checked state.
defaultCheckedboolean—Initial checked state (uncontrolled).
onCheckedChange(checked: boolean) => void—Fired when the switch state changes.
disabledbooleanfalseDisable the switch.

On this page