Component packs › Tabula › Sort Table

Sort Table

Sort any column and every row slides to its new place on a spring, in a wave from the top, while the header arrow turns.

Sort Table is a sortable table from Tabula, a component pack with 8 components: Data table components where rows move to their new places. Price: $2 for the whole pack.

Built with: travelling rows, aria-sort, announced order.

Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.

Sort Table props

PropTypeDefaultDescription
rowsTabulaRow[]
onSort(key: string, dir: 'ascending' | 'descending') => void
theme'dark' | 'light'
autoplaybooleanShowcase mode: sorts by different columns until touched.

Methods on the ref

Use it in React

import SortTable from './SortTable';

<SortTable />

The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.

More in Tabula

Good for: Data tables.