# Switch Group

> Stacked switches that share layout.

Registry name: `switch-group`. HTML docs: https://ui.anuragroy.dev/component/switch-group.

## Install

```bash
npx shadcn@latest add https://ui.anuragroy.dev/r/switch-group.json
```

If the website is down: `npx shadcn@latest add https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/switch-group.json`.

Registry JSON: https://ui.anuragroy.dev/r/switch-group.json (GitHub: https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/switch-group.json).

## Import

Import paths follow the consumer `components.json` aliases. After a default install:

```tsx
import { SwitchGroup } from "@/components/ui/switch-group"
```

## Usage

```tsx
import { Switch } from "@/components/ui/switch"
import { SwitchGroup } from "@/components/ui/switch-group"

export function Example() {
  return (
    <SwitchGroup className="max-w-xs gap-3">
      <label className="flex items-center justify-between gap-4 text-sm">
        Wi‑Fi <Switch defaultChecked />
      </label>
      <label className="flex items-center justify-between gap-4 text-sm">
        Bluetooth <Switch />
      </label>
    </SwitchGroup>
  )
}
```

## API

### SwitchGroup

Layout wrapper (`div`) for a list of labeled switches.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `className` | string | — |  |

## See also

- [HTML page](https://ui.anuragroy.dev/component/switch-group): Preview and the same docs in the site chrome.
- [Registry item](https://ui.anuragroy.dev/r/switch-group.json): Source files and dependencies.
- [Catalog](https://ui.anuragroy.dev/component): All components.
- [llms.txt](https://ui.anuragroy.dev/llms.txt): Agent index for this library.
