Table

A 12px container on Colors/surface/raised. 40px header row and footer on Colors/surface/muted, 48px rows with Colors/border/subtle dividers. Includes cell text, pagination and LinkCard.

Figma: 10 / Components / Table
NameSourceTotal given
Jacob JonesFacebook Direct$169.43
Jerome BellPlatform$779.58
Darlene RobertsonMessenger Ads$576.28
Showing 1 to 3 of 3 supporters

Usage

Source: src/components/ui/table.tsx, src/components/ui/pagination.tsx, src/components/ui/link-card.tsx
import {
    Table,
    TableBody,
    TableCell,
    TableContainer,
    TableFooterBar,
    TableHead,
    TableHeader,
    TableRow
} from '@/components/ui/table'
<TableContainer>
    <Table>
        <TableHeader>
            <TableRow>
                <TableHead sort='ascending' onSort={toggleSort}>Name</TableHead>
                <TableHead align='end'>Total given</TableHead>
            </TableRow>
        </TableHeader>
        <TableBody>
            <TableRow>
                <TableCell>Jacob Jones</TableCell>
                <TableCell align='end'>$169.43</TableCell>
            </TableRow>
        </TableBody>
    </Table>
    <TableFooterBar>Showing 1 to 1 of 1 supporters</TableFooterBar>
</TableContainer>

Cell text

A value with supporting text (text-detail), optionally strong and with a leading icon.
You Are Not Alone03/20/2024

Pagination

24px page buttons; the current page fills with Colors/action/primary.
A compact tile that opens or copies a link, used inside table cells.
See Flow
Journey URLhttps://m.me/stopsoldiersuicide

When to use

When to reach for it, and when to use something else.

Use it for

Complete: Lists of records people compare or act on.
Complete: The table blocks for supporters, links and tools.

Avoid

Not complete: Layout. Tables are for data only.
Not complete: Rows taller than their content needs.

TableHead

PropTypeDefaultDescription
align'start' | 'end' | 'center''start'Numbers align to the end.
sort'ascending' | 'descending' | 'none' | 'unsorted'–Shows the sort icon; active sorts use Colors/icon/brand.
onSort() => void–Makes the header a sort button.

TableRow

PropTypeDefaultDescription
selectedbooleanfalseSelected rows use Colors/text/selection-background.

Pagination

PropTypeDefaultDescription
pagenumber–The current page, from 1.
pageCountnumber–Total pages.
onPageChange(page: number) => void–Called with the new page.
siblingsnumber2Pages shown either side of the current one.

GoodUnited design system. The Figma file is the source of truth for every color, type size and component.

Made with Modulify