Y2K UI

Toggle

A Y2K-styled toggle button with thick navy outline, lemon active state with shadow offset, and toggle group support.

toggle-demo.app

Installation

terminal.sh
npx y2kui add toggle

Usage

import { Toggle, ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle"

Toggle Props

PropTypeDefaultDescription
pressedboolean—Controlled pressed state.
onPressedChange(pressed: boolean) => void—Callback when toggle is clicked.
variant'default' | 'outline' | 'pink' | 'blue' | 'mint' | 'lemon'—Visual variant.
size'sm' | 'md' | 'lg'—Button size.

Toggle Group Props

PropTypeDefaultDescription
type'single' | 'multiple'—Whether one or multiple items can be active.
valuestring | string[]—Controlled value.
defaultValuestring | string[]—Initial value (uncontrolled).
onValueChange(value: string | string[]) => void—Callback when value changes.

On this page