Velocity X Components

Standard Data

Sortable Data Table

Click any column header to sort a dataset ascending or descending, with a sticky header and its own horizontal scroll so wide tables never widen the page on mobile.

Subscription Included with the Velocity Components subscription.
bash
$ velocityx add standard-sortable-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 Sortable Data Table →

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

react v1.0.2 react
Sortable Data Table
Data table
Acme CorpPaid$1,240
Northwind TradersPending$860
Globex IncPaid$2,015
InitechOverdue$430

Props

NameTypeRequiredDefaultDescription
columnsarrayNo[]
rowsarrayNo[]
initialSortKeynullNonull
initialDirectionstringNo"ascending"
getRowIdfunctionNo(row, index) => row.id ?? index
emptyValuestringNo"—"
captionstringNo"Data table"
classNamestringNo""

No `Props:` JSDoc comment found — types are undocumented in source, only names/defaults are known.

File this creates

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

text
components/velocity/standard-sortable-data-table/SortableDataTable.jsx

Using the Sortable Data Table component

Install it with velocityx add standard-sortable-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 Standard Data.