Table

@sushindustries/ui

A table that is a table: declared columns, right-aligned numbers, sideways scroll in its own frame.

5 min read
View as MarkdownEdit on GitHub

A table that renders a plain <table> from a declared column list: header text, a renderer per row, and optional right alignment for numbers. Reach for it whenever data needs to line up in rows and columns - a pricing grid, a changelog, package files - and sorting or selection can stay on the page.

Viewport width
Phone22remthe floor, the narrowest this promises to work at
tanstacktanstack add https://adamjurek.com/r/tanstack/table.jsonshadcnpnpm dlx shadcn@latest add https://adamjurek.com/r/shadcn/table.json

Why it is built this way

Columns are declared once, each with its own renderer - that's as far toward a data grid as this goes. Sorting and selection are the page's state; a table that owns them becomes a component that owns your data flow instead of just rendering it. The frame carries data-lenis-prevent, so a drag that starts inside a wide table scrolls the table sideways in its own frame instead of the page moving underneath it.

Install commands are not written here

Anything in packages/ui/registry.ts gets its TanStack and shadcn commands attached automatically, so there is nothing to keep in sync.

Install

tanstack add https://adamjurek.com/r/tanstack/table.json
shell
pnpm dlx shadcn@latest add https://adamjurek.com/r/shadcn/table.json
shell
pnpm add @sushindustries/ui @sushindustries/atoms
shell

What you get

Version0.1.0
Categorycontent · Data
Filestable.tsx
DependenciesNone
Tagsdata, no-deps

No runtime dependencies

It brings nothing with it beyond the stylesheet.