# Select with custom access level descriptions

> Select with custom access level descriptions

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

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

```tsx
import { Field } from "@/components/ui/field"
import {
  Select,
  SelectContent,
  SelectGroup,
  SelectItem,
  SelectTrigger,
  SelectValue,
} from "@/components/ui/select"

const accessLevels = [
  {
    value: "full_access",
    label: "Full access",
    description: "Can modify list access",
  },
  {
    value: "read_write",
    label: "Read and write",
    description: "Can edit & publish lists",
  },
  {
    value: "read_only",
    label: "Read only",
    description: "Can only view lists",
  },
  {
    value: "no_access",
    label: "No access",
    description: "Cannot view or edit lists",
  },
]

export function Pattern() {
  return (
    <Field className="max-w-xs">
      <Select defaultValue={accessLevels[1]} items={accessLevels}>
        <SelectTrigger className="w-[240px] [&_small]:hidden">
          <SelectValue>
            {(item: (typeof accessLevels)[number]) => item?.label}
          </SelectValue>
        </SelectTrigger>
        <SelectContent alignItemWithTrigger={false}>
          <SelectGroup>
            {accessLevels.map((level) => (
              <SelectItem
                key={level.value}
                value={level}
                className="[&_svg]:text-primary"
              >
                <span className="flex flex-col items-start gap-px">
                  <span className="font-medium">{level.label}</span>
                  <small className="text-muted-foreground text-xs">
                    {level.description}
                  </small>
                </span>
              </SelectItem>
            ))}
          </SelectGroup>
        </SelectContent>
      </Select>
    </Field>
  )
}
```
