# View switcher button group

> View switcher button group

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

- Page, with a live preview: https://shadcn.exchange/r/reui/c-button-group-36
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/reui/c-button-group-36-light-5cbe976540437c59.png
- Registry item: https://reui.io/r/new-york-v4/c-button-group-36.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-button-group-36.json
```

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

## Dependencies

- npm packages: `cn`
- Registry items: `button`, `button-group`

## Files

### `c-button-group-36.tsx`

```tsx
import { cn } from "cn"
import { Button } from "@/components/ui/button"
import { ButtonGroup } from "@/components/ui/button-group"
import { IconPlaceholder } from "@/app/(create)/components/icon-placeholder"

export function Pattern() {
  return (
    <ButtonGroup>
      <Button
        variant="outline"
        size="icon"
        className={cn("bg-muted")}
        aria-label="List view"
      >
        <IconPlaceholder
          lucide="ListIcon"
          tabler="IconList"
          hugeicons="Menu01Icon"
          phosphor="ListIcon"
          remixicon="RiListUnordered"
          aria-hidden="true"
        />
      </Button>
      <Button variant="outline" size="icon" aria-label="Grid view">
        <IconPlaceholder
          lucide="LayoutGridIcon"
          tabler="IconLayoutGrid"
          hugeicons="GridViewIcon"
          phosphor="SquaresFourIcon"
          remixicon="RiGalleryView2"
          aria-hidden="true"
        />
      </Button>
      <Button variant="outline" size="icon" aria-label="Table view">
        <IconPlaceholder
          lucide="TableIcon"
          tabler="IconTable"
          hugeicons="GridTableIcon"
          phosphor="GridNineIcon"
          remixicon="RiTable2"
          aria-hidden="true"
        />
      </Button>
    </ButtonGroup>
  )
}
```
