Skip to main content
ParticleUI

Switch

Toggle switch built on Radix UI with electric accent when checked.

Installation

1

Run the CLI

$npx particleui-cli add switch

Usage

TSX
import { Switch } from "@/components/ui/switch"
import { Label } from "@/components/ui/label"

export default function Example() {
  return (
    <div className="flex items-center gap-2">
      <Switch id="airplane" />
      <Label htmlFor="airplane">Airplane mode</Label>
    </div>
  )
}

Details

Source filecomponents/ui/switch.tsx
Typeui
Categoriesforms, core
npm dependencies@radix-ui/react-switch
Registry deps
Claude skill