# Table > Data table primitives with semantic markup. Import from `@aspyn-io/kit`. Scaffold source: `npx shadcn@latest add https://design.aspyn.io/r/table.json` ## Install ```tsx import { Table, TableHeader, TableBody, TableRow, TableHead, TableCell, TableCaption, } from "@aspyn-io/kit"; ``` ### Data table from an API response Semantic table primitives: bring your own data fetching and state. Statuses map to Badge variants. ```tsx const statusVariant = { paid: "default", pending: "secondary", overdue: "destructive", } as const; Recent invoices for this workspace. Invoice Status Amount {invoices.map((invoice) => ( {invoice.id} {invoice.status} {invoice.amount} ))}
``` ### Footer / totals row TableFooter renders a : use it for a totals row that stays visually distinct from the body. ```tsx Invoice Amount {invoices.map((invoice) => ( {invoice.id} {invoice.amount} ))} Total $950.00
``` ### Row actions A per-row kebab menu keeps destructive and secondary actions out of the way until needed. ```tsx {invoice.id} Actions View Copy link Void invoice ``` ## Notes - The wrapper div provides horizontal overflow scrolling on small screens automatically. - For sorting/filtering/pagination, pair with TanStack Table: these primitives are the render layer.