# Vertical nav links with icons

> Vertical nav links with icons

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

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

```tsx
"use client"

import { useState } from "react"

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"

const navItems = [
  {
    id: "dashboard",
    label: "Dashboard",
    icon: (
      <IconPlaceholder
        lucide="LayoutDashboardIcon"
        tabler="IconLayoutDashboard"
        hugeicons="DashboardSquare01Icon"
        phosphor="SquaresFourIcon"
        remixicon="RiLayoutGridLine"
        aria-hidden="true"
      />
    ),
  },
  {
    id: "analytics",
    label: "Analytics",
    icon: (
      <IconPlaceholder
        lucide="BarChart2Icon"
        tabler="IconChartBar"
        hugeicons="BarChartIcon"
        phosphor="ChartBarIcon"
        remixicon="RiBarChartLine"
        aria-hidden="true"
      />
    ),
  },
  {
    id: "settings",
    label: "Settings",
    icon: (
      <IconPlaceholder
        lucide="SettingsIcon"
        tabler="IconSettings"
        hugeicons="Settings01Icon"
        phosphor="GearIcon"
        remixicon="RiSettings3Line"
        aria-hidden="true"
      />
    ),
  },
  {
    id: "help",
    label: "Help",
    icon: (
      <IconPlaceholder
        lucide="CircleHelpIcon"
        tabler="IconHelp"
        hugeicons="HelpCircleIcon"
        phosphor="QuestionIcon"
        remixicon="RiQuestionLine"
        aria-hidden="true"
      />
    ),
  },
]

export function Pattern() {
  const [active, setActive] = useState("dashboard")

  return (
    <ButtonGroup orientation="vertical">
      {navItems.map((item) => (
        <Button
          key={item.id}
          variant="outline"
          className={cn("justify-start", active === item.id ? "bg-muted" : "")}
          onClick={() => setActive(item.id)}
        >
          {item.icon}
          {item.label}
        </Button>
      ))}
    </ButtonGroup>
  )
}
```
