Layout
Table
The data table primitive: 14px rows with border dividers, 40px header cells in medium weight, muted at 50% on hover and selection.
Guidelines#
Use it for records people compare across columns: campaigns, prospects, deals. Right-align numbers with tabular-nums. Put status in a pill (CampaignStatusBadge, StatusColors) and actions in a trailing DropdownMenu.
What you provide: Table › TableHeader/TableBody/TableFooter › TableRow › TableHead/TableCell, and an optional TableCaption. Max's data-table kit adds a toolbar (32px search and dashed faceted filters), sortable column headers, 32px pagination and a floating bulk-action bar above the mobile tab bar.
Fill gaps where they are: an empty cell offers its fix inline (an Enrich link) instead of a dash.
Facts#
| Group | Layout |
|---|---|
| Product | Max |
| Global | window.DigitalCrew.Table |
| Source | max-agent: src/components/ui/table.tsx |
| Import in the app | import { Table } from "@/components/ui/table"; |
API#
TypeScript declarations emitted from src/components/ui/table.tsx (the module also exports its other parts).
declare function Table({ className, ...props }: React.ComponentProps<"table">): any;
declare function TableHeader({ className, ...props }: React.ComponentProps<"thead">): any;
declare function TableBody({ className, ...props }: React.ComponentProps<"tbody">): any;
declare function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">): any;
declare function TableRow({ className, ...props }: React.ComponentProps<"tr">): any;
declare function TableHead({ className, ...props }: React.ComponentProps<"th">): any;
declare function TableCell({ className, ...props }: React.ComponentProps<"td">): any;
declare function TableCaption({ className, ...props }: React.ComponentProps<"caption">): any;
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };Example#
The code of the preview above: plain React.createElement against window.DigitalCrew, with realistic data.
<div id="root" class="p-6"></div>
<script>
(function () {
var h = React.createElement, DC = window.DigitalCrew, I = DC.Icons;
var ROWS = [["Q4 fintech outreach", "active", 214, "38%", "6"], ["Series B founders", "paused", 96, "41%", "3"], ["Webinar follow-up", "completed", 402, "52%", "19"], ["Partner intro — DACH", "draft", 0, "—", "—"]];
function App() {
return h(DC.Table, null,
h(DC.TableCaption, null, "Campaigns this quarter"),
h(DC.TableHeader, null, h(DC.TableRow, null,
h(DC.TableHead, null, "Campaign"), h(DC.TableHead, null, "Status"),
h(DC.TableHead, { className: "text-right" }, "Prospects"), h(DC.TableHead, { className: "text-right" }, "Open rate"), h(DC.TableHead, { className: "text-right" }, "Meetings"))),
h(DC.TableBody, null, ROWS.map(function (r) {
return h(DC.TableRow, { key: r[0] },
h(DC.TableCell, { className: "font-medium" }, r[0]),
h(DC.TableCell, null, h(DC.CampaignStatusBadge, { status: r[1] })),
h(DC.TableCell, { className: "text-right tabular-nums" }, r[2]),
h(DC.TableCell, { className: "text-right tabular-nums" }, r[3]),
h(DC.TableCell, { className: "text-right tabular-nums" }, r[4]));
})));
}
ReactDOM.createRoot(document.getElementById("root")).render(h(DC.TooltipProvider, { delayDuration: 80 }, h(App)));
})();
</script>