DataTable
The small table: rows already in hand, sorted, striped and sized, with a sticky head. DataGrid takes over when it needs more.
Import
import { DataTable } from '@vitral/vue';Default
Rows in the order they were given. Nothing else is switched on.
| Version | Name | Published |
|---|---|---|
| 0.4.0 | Spreadsheet | 2026-08-14 |
| 0.3.2 | Taskboard | 2026-06-02 |
| 0.3.0 | Schedule | 2026-04-21 |
| 0.2.1 | Chart | 2026-02-09 |
| 0.2.0 | Editor | 2025-12-18 |
| 0.1.0 | Foundations | 2025-10-30 |
Sortable
Click a header to sort by it: ascending, then descending, then back to the order the rows arrived in. One column at a time — a sort over several columns is DataGrid's.
| 0.4.0 | Spreadsheet | Aug 14, 2026 | 12,840 |
| 0.3.2 | Taskboard | Jun 2, 2026 | 9,310 |
| 0.3.0 | Schedule | Apr 21, 2026 | 24,105 |
| 0.2.1 | Chart | Feb 9, 2026 | 31,760 |
| 0.2.0 | Editor | Dec 18, 2025 | 8,422 |
| 0.1.0 | Foundations | Oct 30, 2025 | 4,190 |
Grid lines, sizes and a header of your own
A line between columns as well as between rows, tighter or roomier cells, and the header and footer as content you write.
| Version | Name | Downloads |
|---|---|---|
| 0.4.0 | Spreadsheet | 12,840 |
| 0.3.2 | Taskboard | 9,310 |
| 0.3.0 | Schedule | 24,105 |
| 0.2.1 | Chart | 31,760 |
Its own scroller
Given a height, the table scrolls inside it and the head stays put. The stuck head takes an opaque background, or rows would show through it.
| Published | ||
|---|---|---|
| 0.4.0 | Spreadsheet | 2026-08-14 |
| 0.3.2 | Taskboard | 2026-06-02 |
| 0.3.0 | Schedule | 2026-04-21 |
| 0.2.1 | Chart | 2026-02-09 |
| 0.2.0 | Editor | 2025-12-18 |
| 0.1.0 | Foundations | 2025-10-30 |
Nothing to show
With no rows, one cell spans the table and says so. `empty` — the slot or `<DataTable.Empty>` — replaces the words.
| Version | Name |
|---|---|
| No releases yet. The first one is on its way. | |
API
Read from packages/vue/src/components/DataTable/types.ts, so it says what the component actually accepts.
Props
| Name | Type | Description |
|---|---|---|
| value | readonly unknown[] | The rows, already in hand. This table does not fetch, page or filter. |
| dataKey | string | The field that identifies a row, used as its key. Falls back to its position. |
| caption | string | Shown above the head, for a screen reader; use the `header` slot for something visible. |
| stripedRows | boolean | Every other row tinted. |
| showGridlines | boolean | A line between columns as well as between rows. |
| rowHover | boolean | Rows light up under the pointer. Worth it when a row is a link or opens something. |
| size | 'small' | 'large' | — |
| scrollHeight | string | Gives the table its own scroller of this height, and sticks the head to the top of it. |
| emptyMessage | string | What to say when there are no rows; the `empty` slot wins over it. |
Plus pt, dt and unstyled from BaseProps, see pass-through and unstyled mode.
Slots
| Name | Slot props | Description |
|---|---|---|
| default | () => VNode[] | The `<Column>`s. Any other content here is ignored. |
| header | () => VNode[] | — |
| footer | () => VNode[] | — |
| empty | () => VNode[] | — |