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@latest add toggle

Usage

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

Toggle Props

PropTypeDefaultDescription
pressedbooleanControlled pressed state.
onPressedChange(pressed: boolean) => voidCallback 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[]) => voidCallback when value changes.

On this page