# Select with icon-labeled categories

> Select with icon-labeled categories

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

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

## Files

### `c-select-32.tsx`

```tsx
import { Field } from "@/components/ui/field"
import {
  Select,
  SelectContent,
  SelectGroup,
  SelectItem,
  SelectTrigger,
  SelectValue,
} from "@/components/ui/select"
import { IconPlaceholder } from "@/app/(create)/components/icon-placeholder"

const categories = [
  {
    value: "documents",
    label: "Documents",
    icon: (
      <IconPlaceholder
        lucide="FileTextIcon"
        tabler="IconFileText"
        hugeicons="File02Icon"
        phosphor="FileTextIcon"
        remixicon="RiFileTextLine"
        className="size-4"
      />
    ),
  },
  {
    value: "images",
    label: "Images",
    icon: (
      <IconPlaceholder
        lucide="ImageIcon"
        tabler="IconPhoto"
        hugeicons="ImageIcon"
        phosphor="ImageIcon"
        remixicon="RiImageLine"
        className="size-4"
      />
    ),
  },
  {
    value: "archives",
    label: "Archives",
    icon: (
      <IconPlaceholder
        lucide="ArchiveIcon"
        tabler="IconArchive"
        hugeicons="Archive02Icon"
        phosphor="ArchiveIcon"
        remixicon="RiArchiveLine"
        className="size-4"
      />
    ),
  },
]

export function Pattern() {
  return (
    <Field className="max-w-xs">
      <Select defaultValue={categories[0]} items={categories}>
        <SelectTrigger className="w-[200px]">
          <SelectValue>
            {(item: (typeof categories)[number]) => (
              <span className="flex items-center gap-2">
                {item.icon}
                <span>{item?.label}</span>
              </span>
            )}
          </SelectValue>
        </SelectTrigger>
        <SelectContent alignItemWithTrigger={false}>
          <SelectGroup>
            {categories.map((category) => (
              <SelectItem key={category.value} value={category}>
                <span className="flex items-center gap-2">
                  {category.icon}
                  <span>{category.label}</span>
                </span>
              </SelectItem>
            ))}
          </SelectGroup>
        </SelectContent>
      </Select>
    </Field>
  )
}
```
