Table

Data

Displays structured data in rows and columns.

npx shadcn@latest add table

Default

Preview
Live
WorkspaceStatusMembers
Acme CorpActive12
GlobexTrial4
InitechSuspended0
tsx
1<Table>
2 <TableHeader>
3 <TableRow>
4 <TableHead>Workspace</TableHead>
5 <TableHead>Status</TableHead>
6 <TableHead className="text-right">Members</TableHead>
7 </TableRow>
8 </TableHeader>
9 <TableBody>
10 <TableRow>
11 <TableCell className="font-medium">Acme Corp</TableCell>
12 <TableCell><Badge variant="secondary">Active</Badge></TableCell>
13 <TableCell className="text-right">12</TableCell>
14 </TableRow>
15 </TableBody>
16</Table>

API reference

All props of the underlying Base UI primitive are forwarded. The table below documents the Shelf-specific props.

PropTypeDescription