base-switch-default

PreviousNext
Docs
reuicomponent

Preview

Loading preview…
registry/default/components/base-switch/default.tsx
import { Label } from '@/registry/default/ui/base-label';
import { Switch } from '@/registry/default/ui/base-switch';

export default function SwitchDemo() {
  return (
    <div className="flex items-center space-x-2">
      <Switch id="auto-update" defaultChecked />
      <Label htmlFor="auto-update">Auto update</Label>
    </div>
  );
}

Installation

npx shadcn@latest add @reui/base-switch-default

Usage

import { BaseSwitchDefault } from "@/components/base-switch-default"
<BaseSwitchDefault />