Velocity X Components

Core UI

Data Table — Sticky Header, Sortable

Scrollable data table with a sticky header row and client-side column sorting that cycles ascending, descending, and unsorted.

Subscription Included with the Velocity Components subscription.
bash
$ velocityx add data-table

Built for react. Needs react already installed as a peer dependency. An Astro-only project needs @astrojs/react wired up first — this won't run on its own in plain Astro.

Full docs for Data Table — Sticky Header, Sortable →

Needs a licence key — subscribe here, then velocityx loginonce.

react v1.0.0 react
Data Table — Sticky Header, Sortable
Status
The Boogie CollectiveGrowth$790Active
Auscoast BuildersStarter$290Active
FleetRouteScale$1490Trial
WhisperlineStarter$290Churned
Rebuild ReliefScale$2100Active

Props

NameTypeRequiredDefaultDescription
columns{ key, label, sortable?: boolean, align?: 'left'|'right'|'center', render?: (row) => ReactNode }[]No[]
rowsobject[]No[]
maxHeightstringNo'420px'CSS max-height for the scroll container
rowKey(row) => string|numberNo(r, i) => r.id ?? i

File this creates

The CLI writes this path into your project, relative to its root — nothing else moves.

text
components/velocity/data-table/DataTable.jsx

Using the Data Table — Sticky Header, Sortable component

Install it with velocityx add data-table. The CLI writes the source straight into your project — no runtime dependency, no registry lock-in, and it themes itself from the same primary-*/accent-* scale as the rest of the library.

More from Core UI.