Data display
Table
The base table: a header, hairline-separated rows, figure columns, sorting, selection, a sticky header and frozen columns.
import { EcoTable } from "vue-ecosphere"
Table
Keep the identifying column first with a subtitle; put figures in a numeric column. Never stripe.
| Request | Owner | Status | Age |
|---|---|---|---|
| Deploy requestRelease 4.12 | Daniel Okafor | Pending | 3d |
| Access reviewContractor group | Grace Kim | Approved | 1d |
| Domain transfernorthwind.example | Adam Woods | Blocked | 9d |
| Seat increase40 → 55 seats | Elena Petrova | Draft | 2d |
| Data exportQ3 activity | Kiara Casmer | In review | 5d |
Compact
For dense review work, offered as the reader’s choice.
| Request | Owner | Status | Age |
|---|---|---|---|
| Deploy requestRelease 4.12 | Daniel Okafor | Pending | 3d |
| Access reviewContractor group | Grace Kim | Approved | 1d |
| Domain transfernorthwind.example | Adam Woods | Blocked | 9d |
| Seat increase40 → 55 seats | Elena Petrova | Draft | 2d |
Sortable
Click a header: ascending, descending, then off. Only the sorted column shows its arrow.
| Status | |||
|---|---|---|---|
| Domain transfernorthwind.example | Adam Woods | Blocked | 9d |
| Data exportQ3 activity | Kiara Casmer | In review | 5d |
| Deploy requestRelease 4.12 | Daniel Okafor | Pending | 3d |
| Seat increase40 → 55 seats | Elena Petrova | Draft | 2d |
| Access reviewContractor group | Grace Kim | Approved | 1d |
Sorted by Age (descending)
Selectable
Check rows, or the header to select the page. With some rows checked the header box is indeterminate.
| Request | Owner | Status | Age | |
|---|---|---|---|---|
| Deploy requestRelease 4.12 | Daniel Okafor | Pending | 3d | |
| Access reviewContractor group | Grace Kim | Approved | 1d | |
| Domain transfernorthwind.example | Adam Woods | Blocked | 9d | |
| Seat increase40 → 55 seats | Elena Petrova | Draft | 2d | |
| Data exportQ3 activity | Kiara Casmer | In review | 5d |
2 selected: r1, r3
Sticky header
Whenever the body scrolls, keep the header: a header that scrolls away turns every figure into a guess.
| Request | Owner | Status | Age |
|---|---|---|---|
| Deploy requestRelease 4.12 | Daniel Okafor | Pending | 3d |
| Access reviewContractor group | Grace Kim | Approved | 1d |
| Domain transfernorthwind.example | Adam Woods | Blocked | 9d |
| Seat increase40 → 55 seats | Elena Petrova | Draft | 2d |
| Data exportQ3 activity | Kiara Casmer | In review | 5d |
| Key rotationPrimary cluster | Felipe Alfaro | Pending | 6d |
| Deploy requestRelease 4.12 | Daniel Okafor | Pending | 3d |
| Access reviewContractor group | Grace Kim | Approved | 1d |
| Domain transfernorthwind.example | Adam Woods | Blocked | 9d |
| Seat increase40 → 55 seats | Elena Petrova | Draft | 2d |
| Data exportQ3 activity | Kiara Casmer | In review | 5d |
Frozen first and last columns
A wide table scrolls sideways with the row’s name frozen at the left and its actions at the right. Never pin a middle column.
| Request | Owner | Team | Status | Age | Seats | Last update | Region | Actions |
|---|---|---|---|---|---|---|---|---|
| Deploy requestRelease 4.12 | Daniel Okafor | SRE | Pending | 3d | 12 | Two checks running | ap-south-1 | |
| Access reviewContractor group | Grace Kim | Security | Approved | 1d | 4 | Approved by Security | us-east-1 | |
| Domain transfernorthwind.example | Adam Woods | Platform | Blocked | 9d | 27 | Waiting on registrar | eu-west-2 | |
| Seat increase40 → 55 seats | Elena Petrova | Finance | Draft | 2d | 8 | Sent to Finance | ap-south-1 | |
| Data exportQ3 activity | Kiara Casmer | Analytics | In review | 5d | 19 | In review | us-west-2 | |
| Key rotationPrimary cluster | Felipe Alfaro | SRE | Pending | 6d | 31 | Scheduled for Friday | eu-central-1 |
Empty
With no rows, the #empty slot fills a full-width row. Say what will fill it.
| Request | Owner | Status | Age |
|---|---|---|---|
No requests yet. New requests appear here as soon as someone files one. | |||
API
| Name | Type | Default | Description |
|---|---|---|---|
columns | EcoTableColumn[] | — | { key, label, numeric?, width?, sortable?, action?, srLabel?, sortValue?, format? }. numeric renders col-num, right-aligned and tabular. |
rows | object[] | — | Row objects; identity from rowKey. |
rowKey | string | (row) => key | "id" | Row identity for selection and keys. |
#cell-<key> / #head-<key> | { row, value, index } / { column } | — | Override a cell or a header. |
compact | boolean | false | Dense rows, for scanning for one row among many. |
sticky | boolean | false | Header stays put while the body scrolls. |
nowrap / fixed | boolean | false | One line per row (table--nowrap); fixed layout (table--fixedw). |
pinFirst / pinLast | boolean | false | Freeze the identifying first column and the action column. Only when the table scrolls. |
rowHeader | boolean | false | First column as th scope="row". |
selectable | boolean | false | Checkbox column with a select-all header (indeterminate for a partial page). |
v-model:selected | (string | number)[] | [] | Selected row keys. Selected rows take the violet tint and accent rule. |
v-model:sort | { key, dir: "asc" | "desc" } | null | null | Header click cycles ascending → descending → off; aria-sort marks the sorted column. |
manualSort | boolean | false | Leave rows in the given order (server-side sorting); still emits update:sort. |
loading | boolean | false | Skeleton rows and aria-busy. |
caption | string | — | Visually hidden caption. |
#empty | — | — | Shown in a full-width row when there are no rows. Say how rows will arrive. |