# Select with status badges

> Select with status badges

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

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

## Files

### `c-select-19.tsx`

```tsx
import { Badge, BadgeProps } from "@/components/reui/badge"

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

const statuses = [
  { value: "1", label: "In Progress", variant: "warning-outline" },
  { value: "2", label: "Completed", variant: "success-outline" },
  { value: "3", label: "Pending", variant: "info-outline" },
  { value: "4", label: "Cancelled", variant: "primary-outline" },
  { value: "5", label: "Rejected", variant: "destructive-outline" },
]

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