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.
$ 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.
| Acme Corp | Paid | $1,240 |
| Northwind Traders | Pending | $860 |
| Globex Inc | Paid | $2,015 |
| Initech | Overdue | $430 |
Props
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| columns | array | No | [] | |
| rows | array | No | [] | |
| initialSortKey | null | No | null | |
| initialDirection | string | No | "ascending" | |
| getRowId | function | No | (row, index) => row.id ?? index | |
| emptyValue | string | No | "—" | |
| caption | string | No | "Data table" | |
| className | string | No | "" |
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.
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.
Related components
More from Standard Data.
A query-builder for data tables — stack field/operator/value condition rows and combine them with a shared AND/OR joiner, so users compose multi-condition filters without writing a query language.
reactCheckbox row selection for a data table with a correctly indeterminate select-all, a live selected count, and a contextual action bar that appears only once something is selected, so bulk edit, export, or delete never need a separate mode.
reactTurns a truncated table cell into a focus-trapped popover showing the full value with a one-click copy button, so long IDs, JSON blobs or notes never need their own column width.
reactA settings popover for showing or hiding table columns, with the chosen layout remembered between visits so people don't have to rebuild their view every time they come back.
react