Detail split — Record block

Pro

record-detail-split · for app pages

Detail split

A record read mostly for its linked lists: its fields in a narrow column beside them

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/record-detail-split

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import RecordDetailSplit from '@/components/trame/blocks/record/record-detail-split.vue'

const props = {
title: "Order #1048",
recordId: "1048",
subtitle: "Placed on October 9, 2026 in the online shop",
back: {
label: "Orders",
action: "orders.list"
},
status: {
label: "Paid",
tone: "info",
transitions: [
{
label: "Mark as shipped",
action: "order.ship"
},
{
label: "Cancel order",
action: "order.cancel",
tone: "danger"
}
]
},
actions: {
primary: {
label: "Create label",
action: "order.label"
},
secondary: [
{
label: "Edit",
action: "order.edit"
},
{
label: "Print invoice",
action: "order.invoice"
}
],
destructive: {
label: "Delete",
action: "order.delete",
confirm: {
title: "Delete order #1048?",
text: "The order and its history will be erased. This can’t be undone.",
confirmLabel: "Delete permanently"
}
}
},
sections: [
{
title: "Summary",
fields: [
{
label: "Number",
type: "id",
value: "#1048"
},
{
label: "Date",
type: "date",
value: "2026-10-09"
}
]
},
{
title: "Customer",
rail: true,
fields: [
{
label: "Name",
value: "Camille Laurent",
action: "customer.open",
record: {
id: 214
}
},
{
label: "Email",
type: "email",
value: "[email protected]"
}
]
}
],
related: [
{
title: "Items",
columns: [
{
key: "name",
label: "Item"
},
{
key: "qty",
label: "Qty",
type: "number"
}
],
rows: [
{
id: 1,
name: "Windbreaker · Midnight blue · M",
qty: 1,
unit: 12900,
total: 12900
},
{
id: 2,
name: "Insulated bottle 25 oz",
qty: 2,
unit: 2400,
total: 4800
}
],
empty: "No items on this order.",
tab: "items"
}
],
activity: {
title: "History",
tab: "history",
items: [
{
label: "Payment received",
detail: "Credit card, $209.00",
date: "October 9, 2026, 2:32 PM"
},
{
label: "Order placed",
by: "Camille Laurent",
date: "October 9, 2026, 2:30 PM"
}
]
},
statuses: [
{
value: "pending",
label: "Awaiting payment",
tone: "warning"
},
{
value: "paid",
label: "Paid",
tone: "info"
}
],
options: {
currency: "USD"
}
}
</script>

<template>
<RecordDetailSplit v-bind="props" />
</template>

Props

Each prop says who changes it: Words, Picture, Action, Design, Data.* required.

PropTypeDescription
title*stringWordsthe record’s name ("Order #1048", "Camille Laurent")
subtitlestringWordsone line under the title: its kind, its date
recordIdstring | numberDatathe record’s id: the page’s actions run through the host with it (`{ id, ids: [id] }`)
backBackthe back action: its words and the page action it runs
statusStatusthe record’s status, in words and colour
actionsActionswhat can be done on the record
sections*Section[]the fields, grouped; each rendered as a definition list
relatedRelated[]related records, as small tables, e.g. "Invoices"
activityActivitythe record’s history
statusesStatuse[]words and tones of the values of `status` fields and columns
loadingbooleanthe record is being fetched: each value is a placeholder under its label, the page busy
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Back back · 2 props
PropTypeDescription
label*stringWords"Orders"
action*stringActionthe list
Status status · 3 props
PropTypeDescription
label*stringWordsthe status in words, as the app says it
tone'neutral' | 'info' | 'success' | 'warning' | 'danger'the status colour
transitionsTransition[]the moves the server allows from this status, and no others
Transition status.transitions[] · 3 props
PropTypeDescription
label*stringWords"Mark as shipped"
action*stringActionthe page action that moves the record there
tone'neutral' | 'info' | 'success' | 'warning' | 'danger'the status colour
Actions actions · 3 props
PropTypeDescription
primaryPrimarythe main button: its words and the page action it runs
secondarySecondary[]other actions on the record
destructiveDestructivethe destructive action: its words and the page action it runs
Primary actions.primary · 2 props
PropTypeDescription
label*stringWordsthe words on the button or link
action*stringActiona named action of the page
Secondary actions.secondary[] · 4 props
PropTypeDescription
label*stringWordsthe words on the button or link
action*stringActiona named action of the page
tone'neutral' | 'info' | 'success' | 'warning' | 'danger'the status colour
confirmConfirmasked before it runs, as the destructive action is
Confirm actions.secondary[].confirm · 3 props
PropTypeDescription
title*stringWordsthe confirmation’s title
text*stringWordswhat it does and whether it can be undone
confirmLabel*stringWordsthe words on the confirming button
Destructive actions.destructive · 3 props
PropTypeDescription
label*stringWords"Delete"
action*stringActiona named action of the page
confirm*Confirmthe question asked before it runs
Confirm actions.destructive.confirm · 3 props
PropTypeDescription
title*stringWordsthe confirmation’s title
text*stringWordswhat it does and whether it can be undone
confirmLabel*stringWordsthe words on the confirming button
Section sections[] · 4 props
PropTypeDescription
title*stringWords"Delivery", "Contact"
tabstringDesigntabs variant: the tab it belongs to (the first tab when empty)
railbooleanprofile variant: kept in the side rail
fields*Field[]the form’s fields, in order
Field sections[].fields[] · 8 props
PropTypeDescription
label*stringWordsthe words on the button or link
type'text' | 'longtext' | 'id' | 'money' | 'number' | 'date' | 'datetime' | 'email' | 'phone' | 'status' | 'boolean' | 'select' | 'relation' | 'image' | 'file'how a value reads: datetime, a moment in UTC (one without a zone as written); select, the option’s label in its tone; relation, the linked record’s name, a link through `action` and `record`; image, a thumbnail of the address; file, a link to the address with its name and size
valuestring | number | boolean | unknownDatathe stored value; money in cents; an empty value shows "—"
tone'neutral' | 'info' | 'success' | 'warning' | 'danger'the status colour
actionstringActionopens the linked record
recordRecord<string, unknown>Datathe record the action applies to, passed to the host with it, if any
optionsOption[]select: the words and tones of the values it may hold
fileFilea file held in the field
Option sections[].fields[].options[] · 3 props
PropTypeDescription
value*stringDesignthe value stored
label*stringWordsthe value in words, as shown
tone'neutral' | 'info' | 'success' | 'warning' | 'danger'the status colour
File sections[].fields[].file · 2 props
PropTypeDescription
namestringWordsthe file’s name, its address’s last part by default
sizenumberDatain bytes
Related related[] · 9 props
PropTypeDescription
title*stringWords"Articles", "Invoices"
tabstringDesigntabs variant: the tab it belongs to
totalnumberDatathe real total, when the rows are only some of them
columns*Column[]the related list’s columns, in order
rows*Record<string, unknown>[]Datathe related list’s rows, in order
openstringActionwhat a row’s first cell leads to
allAllthe see-all link: its words and the page action it runs
createCreatethe create action: its words and the page action it runs
emptystringWordswhat an empty list says
Column related[].columns[] · 3 props
PropTypeDescription
key*stringDesignthe row key to read
label*stringWordsthe column’s name, as shown
type'text' | 'longtext' | 'id' | 'money' | 'number' | 'date' | 'datetime' | 'email' | 'phone' | 'status' | 'boolean' | 'select' | 'relation' | 'image' | 'file'how a value reads: datetime, a moment in UTC (one without a zone as written); select, the option’s label in its tone; relation, the linked record’s name, a link through `action` and `record`; image, a thumbnail of the address; file, a link to the address with its name and size
All related[].all · 2 props
PropTypeDescription
label*stringWords"See all orders"
action*stringActiona named action of the page
Create related[].create · 2 props
PropTypeDescription
labelstringWords"Add a service visit" ("Add" by default)
action*stringActionopens the form of a record linked to this one; the record carries id
Activity activity · 4 props
PropTypeDescription
title*stringWords"History"
tabstringDesigntabs variant: the tab it belongs to
items*Item[]the history’s entries
emptystringWordswhat an empty history says
Item activity.items[] · 4 props
PropTypeDescription
label*stringWordswhat happened
date*stringWordsas the app writes it
bystringWordswho did it
detailstringWordsa line of detail
Statuse statuses[] · 3 props
PropTypeDescription
value*stringDesignthe value a status field stores
label*stringWordsthe value in words, as shown
tone'neutral' | 'info' | 'success' | 'warning' | 'danger'the status colour
Options options · 2 props
PropTypeDescription
currencystringDesignISO 4217, EUR by default
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 }
gonavigates after a success
canwhether the page has this action
moneyformats a price, given in cents
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: back, status.transitions[], actions.primary, actions.secondary[], actions.destructive, sections[].fields[], related[].open, related[].all, related[].create
  • Reads record, related from your app

A record section, for app pages; it uses @lucide/vue, @vueuse/core, 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 record blocks

  • Customer case view stacked: A customer-facing case page showing only the merchant’s own public replies and a reply form, without internal notes or macros.
  • Facets tabbed: a record with many facets (overview, items, documents, history): one panel at a time, the tab kept in the address.
  • Invoice compact: A narrow receipt-like document with stacked line items for the merchant’s own short invoices.
  • Invoice document: A complete document with seller, buyer and a tax ledger, using the merchant’s own invoice only.
  • Invoice split: The merchant’s own invoice with a separate payment summary and actions for collection workflows.
  • Profile sidebar: a person or an organisation: a side rail with identity, stored counters and key facts, the work in the main column.
  • Shipment detail map band: the map as a wide band under the header with the route and facts in a card over it, the feed in full width below: a team that reads where the shipment is first; positions and times from the carrier only.
  • Shipment detail map beside: the route, stage track, facts and carrier feed in one column, the map beside them at the height of the screen: a team working the shipment’s events; positions and times from the carrier only.

All 11 record blocks