Game One

Switch

Binary toggle switch styled with semantic tokens.

Default
Small

Installation

npx shadcn@latest add @gameone/switch

Registry dependencies: gameone-utils

Usage

Import
import { Switch } from "@/components/ui/switch"
Example
<Switch />

Examples

Default

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

export function SwitchDefault() {
  return <Switch defaultChecked />
}

Small

Compact switch size for dense toolbars, tables, and settings rows.

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

export function SwitchSmall() {
  return <Switch size="sm" defaultChecked />
}