Stage rows track — Table block
Protable-stage-rows-track · for app, orders, shipments pages
Stage rows track
Many records followed at a glance (shipments, sales orders): a table whose progress column is a row of joined dots, an exception named in words
Documentation
Installation
One command copies the block into your project with the shadcn CLI (the registry is set once: Installation).
pnpm dlx shadcn-vue@latest add @trame/table-stage-rows-trackUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import TableStageRowsTrack from '@/components/trame/blocks/table/table-stage-rows-track.vue'
const props = {
title: "This week’s shipments",
subtitle: "Where each parcel stands",
stages: [
"Ordered",
"Packed"
],
rows: [
{
id: 1042,
title: "Order 1042",
fields: [
{
label: "Customer",
value: "Claire Morel"
},
{
label: "Carrier",
value: "Tracked parcel"
}
],
figure: "$184.00",
person: {
name: "Elise Garnier",
avatar: "https://images.unsplash.com/photo-1580489944761-15a19d654956?w=160&q=80"
},
stage: 2,
dates: [
"Oct 12",
"Oct 13"
],
note: "The parcel left the workshop this morning.",
next: {
label: "Track the parcel",
action: "shipment.track"
}
},
{
id: 1041,
title: "Order 1041",
fields: [
{
label: "Customer",
value: "Paul Lever"
},
{
label: "Carrier",
value: "Pickup point"
}
],
figure: "$62.50",
person: {
name: "Karim Benali"
},
stage: 1,
dates: [
"Oct 12",
"Oct 13"
],
exception: "Incomplete address",
note: "The street number is missing: the carrier rejects the label.",
next: {
label: "Fix the address",
action: "order.address"
}
}
],
tabs: [
{
label: "All",
count: 6,
active: true,
action: "shipments.view",
record: {
view: "all"
}
},
{
label: "To pack",
count: 1,
action: "shipments.view",
record: {
view: "pack"
}
}
],
search: {
placeholder: "Search for an order",
action: "shipments.search"
},
create: {
label: "New shipment",
action: "shipment.create"
},
open: "order.open"
}
</script>
<template>
<TableStageRowsTrack v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe list’s heading ("Shipments") |
| subtitle | string | Wordsone line under the title |
| stages* | string[] | Wordsthe ordered stages every row goes through, 3 to 6 ideally |
| rows* | Row[] | Datathe records, as the tool sorts them |
| tabs | Tab[] | views by stage or state ("All", "Late"): links the host answers |
| search | Search | the search field |
| create | Create | the create action: its words and the page action it runs |
| open | string | Actionthe page of one record (record: the row) |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Row rows[] · 11 props
| Prop | Type | Description |
|---|---|---|
| id* | string | number | Datathe record’s id in the tool |
| title* | string | Wordsthe record’s name or number ("Order 1042") |
| fields | Field[] | a few facts, the same labels on every row ("Customer", "Carrier") |
| figure | string | Wordsan amount or a count, as the tool writes it ("€240.00") |
| person | Person | who looks after it: the owner, the customer or the carrier’s contact |
| stage* | number | the index of the last stage reached, in `stages` |
| dates | string[] | Wordsthe date each stage was reached, by index |
| exception | string | Wordswhat holds it up at its stage, as the tool reports it ("Carrier delay") |
| cancelled | boolean | true: the row is cancelled |
| note | string | Wordsone status sentence ("Packed, waiting for the carrier") |
| next | Next | the next step a person can take ("Print the label") |
Field rows[].fields[] · 2 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat the value is about |
| value* | string | Wordsthe value, as the merchant states it |
Person rows[].person · 6 props
| Prop | Type | Description |
|---|---|---|
| id | string | number | Datathe record’s id in the tool that answers it |
| name* | string | Wordsthe person’s name |
| role | string | Wordstheir role or job title |
| company | string | Wordswhere they work |
| avatar | string | Picturea picture: a root-relative path (/media/…) or an absolute URL |
| url | string | Designa page about them |
Next rows[].next · 2 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe words on the button or link |
| action* | string | Actiona named action of the page |
Tab tabs[] · 5 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe link’s words, e.g. "Unpaid" |
| count | number | Datahow many records it holds, as the host counted them |
| active | boolean | true: this is the one shown now |
| action* | string | Actionthe page action that shows it |
| record | Record<string, unknown> | Datawhat the action needs (the filter’s value) |
Search search · 3 props
| Prop | Type | Description |
|---|---|---|
| placeholder* | string | Wordswhat the search field says ("Search for an order") |
| value | string | Wordsthe current query, as the address carries it |
| action* | string | Actionthe page the form sends the query to (?q=) |
Create create · 2 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe words on the button or link |
| action* | string | Actiona named action of the page |
Options options · 1 props
| Prop | Type | Description |
|---|---|---|
| mood | 'inverse' | 'brand' | 'warm' | 'tint' | string | a band of the page that redefines the theme surfaces inside it |
What it asks your app for
The block never knows your app: it asks it, through one context provided once, where its links lead, what its actions do, how a price reads and which words to say (The host context).
| Member | What it is for |
|---|---|
| href | the address an action leads to, or null to hide what leads there |
| act | runs a change (subscribe, add to cart, save) and answers { ok } or { ok: false, error } |
| can | whether the page has this action |
| asset | a picture’s address as your app serves it |
| Link | your router’s link component |
| cartCount | the cart badge’s number |
| cartDrawer | whether your app has a cart drawer |
| cartOpen | whether the cart drawer is open |
| label | your word for an interface key, or undefined to keep the block’s own |
The words it says itself, in English and French; label(key) replaces any of them:
| Key | English | French |
|---|---|---|
| newsletter.already | You are already subscribed. | Vous êtes déjà inscrit. |
| newsletter.done | Done: you are subscribed. | C’est noté : vous êtes inscrit. |
| newsletter.invalid | Check the email address. | Vérifiez l’adresse e-mail. |
| newsletter.tooMany | Too many attempts, try again in a moment. | Trop de tentatives, réessayez dans un moment. |
Features
- Every word in the server HTML
- Same markup in Vue and React
- Theme tokens only: every theme, light and dark
- Shows what you give it, invents nothing
- No motion; still under reduced motion
- Real buttons and links, a visible focus
- Asks your app through actions:
rows[].next,tabs[],search,create,open - Reads
rowsfrom your app
A table section, for app, orders, shipments pages; it uses @lucide/vue, class-variance-authority, clsx, reka-ui, tailwind-merge.
Built with
The components this block is made of; each one installs on its own too.
More table blocks
- Resource list: records a team searches, sorts and acts on, one comfortable row each: orders, invoices, customers.
- Resource totals: records whose amounts matter together: a footer with the selection count and the list’s own totals.
- Spreadsheet grid: Edit a dense table with a frozen first column and row selection, then save the edits in one go.
- Spreadsheet summary bar: Keep the selection count and numeric sum prominent above the editable grid, saved in one go.
- Stock levels filter rail: a long inventory narrowed often: filters in a left rail beside dense rows (a "Filters" sheet on a phone).
- Stock levels meter cards: a small catalogue checked by its pictures: a grid of compact cards, prices in two figures and the stock bar at the foot.
- Stock levels meter: a merchant scanning many lines at once: a table whose stock column is a short bar against the reorder point, with the state in words.
- Webhook deliveries log: An endpoint’s page in developer settings: a dense table of deliveries (status, event, HTTP code, time, duration), each row opening in place on its request, its response and "Retry" when it failed.