Stage rows track — Table block

Pro

table-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-track

Usage

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.

PropTypeDescription
title*stringWordsthe list’s heading ("Shipments")
subtitlestringWordsone 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
tabsTab[]views by stage or state ("All", "Late"): links the host answers
searchSearchthe search field
createCreatethe create action: its words and the page action it runs
openstringActionthe page of one record (record: the row)
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Row rows[] · 11 props
PropTypeDescription
id*string | numberDatathe record’s id in the tool
title*stringWordsthe record’s name or number ("Order 1042")
fieldsField[]a few facts, the same labels on every row ("Customer", "Carrier")
figurestringWordsan amount or a count, as the tool writes it ("€240.00")
personPersonwho looks after it: the owner, the customer or the carrier’s contact
stage*numberthe index of the last stage reached, in `stages`
datesstring[]Wordsthe date each stage was reached, by index
exceptionstringWordswhat holds it up at its stage, as the tool reports it ("Carrier delay")
cancelledbooleantrue: the row is cancelled
notestringWordsone status sentence ("Packed, waiting for the carrier")
nextNextthe next step a person can take ("Print the label")
Field rows[].fields[] · 2 props
PropTypeDescription
label*stringWordswhat the value is about
value*stringWordsthe value, as the merchant states it
Person rows[].person · 6 props
PropTypeDescription
idstring | numberDatathe record’s id in the tool that answers it
name*stringWordsthe person’s name
rolestringWordstheir role or job title
companystringWordswhere they work
avatarstringPicturea picture: a root-relative path (/media/…) or an absolute URL
urlstringDesigna page about them
Next rows[].next · 2 props
PropTypeDescription
label*stringWordsthe words on the button or link
action*stringActiona named action of the page
Tab tabs[] · 5 props
PropTypeDescription
label*stringWordsthe link’s words, e.g. "Unpaid"
countnumberDatahow many records it holds, as the host counted them
activebooleantrue: this is the one shown now
action*stringActionthe page action that shows it
recordRecord<string, unknown>Datawhat the action needs (the filter’s value)
Search search · 3 props
PropTypeDescription
placeholder*stringWordswhat the search field says ("Search for an order")
valuestringWordsthe current query, as the address carries it
action*stringActionthe page the form sends the query to (?q=)
Create create · 2 props
PropTypeDescription
label*stringWordsthe words on the button or link
action*stringActiona named action of the page
Options options · 1 props
PropTypeDescription
mood'inverse' | 'brand' | 'warm' | 'tint' | stringa 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).

MemberWhat it is for
hrefthe address an action leads to, or null to hide what leads there
actruns a change (subscribe, add to cart, save) and answers { ok } or { ok: false, error }
canwhether the page has this action
asseta picture’s address as your app serves it
Linkyour router’s link component
cartCountthe cart badge’s number
cartDrawerwhether your app has a cart drawer
cartOpenwhether the cart drawer is open
labelyour 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:

KeyEnglishFrench
newsletter.alreadyYou are already subscribed.Vous êtes déjà inscrit.
newsletter.doneDone: you are subscribed.C’est noté : vous êtes inscrit.
newsletter.invalidCheck the email address.Vérifiez l’adresse e-mail.
newsletter.tooManyToo 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 rows from 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.

All 24 table blocks