Tableshadcn
Rows and columns of records.
Data display- Install
- npx shadcn add table
- Import from
- @/components/ui/table
- Guidance
- draft · v0.1.0
Examples
As installed from shadcn – rendering in jsp-ds tokens through the bridge.
| Invoice | Client | Status | Amount |
|---|---|---|---|
| INV-0041 | Into Games | Paid | £4,800.00 |
| INV-0042 | Picsl | Due | £6,250.00 |
| INV-0043 | Review Hub | Draft | £1,200.00 |
Guidance
When to use
- Records people compare across the same columns: invoices, screens, team members.
Rules
- A
TableCaptionor a heading names the table. - Right-align numbers and use
tabular-nums; left-align text. - Status is a Badge with words.
- Keep row actions in a ghost icon button with a menu, labelled with the row's name (Actions for Q3 report).
Known limitation
- shadcn's wrapper scrolls wide tables but isn't keyboard-focusable (ISS-08). Wrap wide tables yourself until a JSP DataTable exists.
Install
Terminal
npx shadcn add tableImport
import { Table } from "@/components/ui/table"From shadcn’s own registry. Don’t edit the installed file – jsp-ds styles it through the bridge, and fixes go in styles/overrides.css with an issue.