Sortable table
A table with sortable columns, optional selection, loading and empty states.
| Atlas platform | Mara Chen | Active | $48,000 | |
|---|---|---|---|---|
| Harbour redesign | Noor Haddad | In review | $21,000 | |
| Release notes | Ivo Petrov | Active | $6,500 | |
| Wayfinder | Sana Okafor | Paused | $33,000 |
Sorted by Project, ascending.
When to use
- Records people need to sort and select.
- Admin screens with bulk actions.
When not to use
- Thousands of rows; use a virtual table.
Installation
pnpm dlx shadcn@latest add @caliper/sortable-table
Adds its 4 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
API reference
SortableTable
13 props
sortRows
0 props
No props of its own; it accepts the native props of its root element.
Keyboard
- No custom key handling; Tab and the native activation keys do the work.
Accessibility
It exposes status semantics, with aria-busy, aria-live, aria-label, aria-sort and aria-hidden kept in step with state. Changes that matter are announced through a live region.
Motion
- State changes animate with the library's shared durations and curves, so its timing matches every other part.
- Under reduced motion each change lands on its end state without movement; nothing is hidden or skipped.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/sortable-table.mdThe index of every part is at /llms.txt.