# Switch with badges

> Switch with badges

A shadcn/ui block from the [@reui](https://reui.io) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/reui/c-switch-10).

- Page, with a live preview: https://shadcn.exchange/r/reui/c-switch-10
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/reui/c-switch-10-light-2696c93319144745.png
- Registry item: https://reui.io/r/new-york-v4/c-switch-10.json
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://reui.io/r/new-york-v4/c-switch-10.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- Registry items: `badge`, `field`, `switch`

## Files

### `c-switch-10.tsx`

```tsx
import { Badge } from "@/components/ui/badge"
import { Field, FieldLabel } from "@/components/ui/field"
import { Switch } from "@/components/ui/switch"

export function Pattern() {
  return (
    <div className="flex flex-col gap-4">
      <Field orientation="horizontal">
        <Switch id="sw-badge-1" defaultChecked />
        <div className="flex items-center gap-2">
          <FieldLabel htmlFor="sw-badge-1">AI Copilot</FieldLabel>
          <Badge className="h-4.5 rounded-full px-1.5 text-[10px] tracking-wider uppercase">
            New
          </Badge>
        </div>
      </Field>
      <Field orientation="horizontal">
        <Switch id="sw-badge-2" />
        <div className="flex items-center gap-2">
          <FieldLabel htmlFor="sw-badge-2">Smart suggestions</FieldLabel>
          <Badge
            variant="secondary"
            className="h-4.5 rounded-full px-1.5 text-[10px] tracking-wider uppercase"
          >
            Beta
          </Badge>
        </div>
      </Field>
    </div>
  )
}
```
