# Table in card with status badges.

> Table in card with status badges.

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

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

## Files

### `c-table-3.tsx`

```tsx
import { Card, CardContent } from "@/components/ui/card"
import {
  Table,
  TableBody,
  TableCell,
  TableHead,
  TableHeader,
  TableRow,
} from "@/components/ui/table"

const tasks = [
  {
    id: "1",
    name: "Design homepage",
    status: "Completed",
    statusColor: "bg-green-500/10 text-green-700",
  },
  {
    id: "2",
    name: "Implement API",
    status: "In Progress",
    statusColor: "bg-yellow-500/10 text-yellow-700",
  },
  {
    id: "3",
    name: "Write tests",
    status: "Pending",
    statusColor: "bg-gray-500/10 text-gray-700",
  },
]

export function Pattern() {
  return (
    <div className="mx-auto flex w-full max-w-lg flex-col">
      <Card className="p-0">
        <CardContent className="p-0">
          <Table>
            <TableHeader>
              <TableRow>
                <TableHead>Task</TableHead>
                <TableHead className="text-right">Status</TableHead>
              </TableRow>
            </TableHeader>
            <TableBody>
              {tasks.map((task) => (
                <TableRow key={task.id}>
                  <TableCell className="font-medium">{task.name}</TableCell>
                  <TableCell className="text-right">
                    <span
                      className={`inline-flex items-center rounded-full px-2 py-1 text-xs font-medium ${task.statusColor}`}
                    >
                      {task.status}
                    </span>
                  </TableCell>
                </TableRow>
              ))}
            </TableBody>
          </Table>
        </CardContent>
      </Card>
    </div>
  )
}
```
