Data Display · ui · 5K

Table

A table in the Finder list style: column titles in the chrome face over a 1px rule, the sorted column underlined via aria-sort, rows at the list row height with no lines, and a selected row that inverts only its first text cell.

Same parts and data-slot attributes as shadcn/ui's Table. Set data-state="selected" on a TableRow to select it. Bare strings and numbers in a TableCell are wrapped in a data-slot="table-cell-text" span so only the text inverts; wrap your own text in such a span when a cell holds an icon or other elements.

Install

pnpm dlx shadcn@latest add @s7ui/table

Example

This example also uses @s7ui/icons.

5 items, sorted by name.
NameSizeKindLast Modified
Annual Report
48KdocumentMon, Mar 2, 1992
Budget 1992
12KspreadsheetTue, Feb 18, 1992
Letters
—folderFri, Feb 14, 1992
Meeting Notes
4KdocumentMon, Mar 2, 1992
Price List
8KdocumentThu, Jan 30, 1992
Total72K

Info

Files:
components/ui/table.tsx
Uses:
@s7ui/theme
Packages:
—