Profile sidebar — Record block
Prorecord-profile-sidebar · for app pages
Profile sidebar
A person or an organisation: a side rail with identity, stored counters and key facts, the work in the main column
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-profile-sidebarUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import RecordProfileSidebar from '@/components/trame/blocks/record/record-profile-sidebar.vue'
const props = {
title: "Camille Laurent",
recordId: "c-207",
back: {
label: "Customers",
action: "customers.list"
},
status: {
label: "Active",
tone: "success"
},
actions: {
primary: {
label: "Email the customer",
action: "customer.mail"
},
secondary: [
{
label: "Edit",
action: "customer.edit"
}
],
destructive: {
label: "Delete customer",
action: "customer.delete",
confirm: {
title: "Delete this customer?",
text: "Their record will be erased; their orders stay in the shop. This can’t be undone.",
confirmLabel: "Delete"
}
}
},
profile: {
tag: "Customer since March 2024",
counters: [
{
label: "Orders",
value: "3"
},
{
label: "Spent",
value: "$412.90"
}
]
},
sections: [
{
title: "Contact details",
rail: true,
fields: [
{
label: "Email",
type: "email",
value: "[email protected]"
},
{
label: "Phone",
type: "phone",
value: "(503) 555-0178"
}
]
},
{
title: "Preferences",
fields: [
{
label: "Language",
value: "English"
},
{
label: "Newsletter",
type: "boolean",
value: true
}
]
}
],
related: [
{
title: "Orders",
total: 3,
columns: [
{
key: "number",
label: "Order",
type: "id"
},
{
key: "status",
label: "Status",
type: "status"
}
],
rows: [
{
id: 1048,
number: "#1048",
status: "paid",
date: "2026-10-09",
total: 20900
},
{
id: 1002,
number: "#1002",
status: "delivered",
date: "2026-06-18",
total: 8900
}
],
open: "order.open",
all: {
label: "See all orders",
action: "orders.list"
}
}
],
activity: {
title: "History",
items: [
{
label: "Order #1048 placed",
date: "October 9, 2026"
},
{
label: "Signed up for the newsletter",
date: "March 2, 2024"
}
]
},
statuses: [
{
value: "pending",
label: "Awaiting payment",
tone: "warning"
},
{
value: "paid",
label: "Paid",
tone: "info"
}
],
options: {
currency: "USD"
}
}
</script>
<template>
<RecordProfileSidebar v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe record’s name ("Order #1048", "Camille Laurent") |
| subtitle | string | Wordsone line under the title: its kind, its date |
| recordId | string | number | Datathe record’s id: the page’s actions run through the host with it (`{ id, ids: [id] }`) |
| back | Back | the back action: its words and the page action it runs |
| status | Status | the record’s status, in words and colour |
| actions | Actions | what can be done on the record |
| profile | Profile | the record’s profile card: its picture, name and figures |
| sections* | Section[] | the fields, grouped; each rendered as a definition list |
| related | Related[] | related records, as small tables, e.g. "Invoices" |
| activity | Activity | the record’s history |
| statuses | Statuse[] | words and tones of the values of `status` fields and columns |
| loading | boolean | the record is being fetched: each value is a placeholder under its label, the page busy |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Back back · 2 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Words"Orders" |
| action* | string | Actionthe list |
Status status · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe status in words, as the app says it |
| tone | 'neutral' | 'info' | 'success' | 'warning' | 'danger' | the status colour |
| transitions | Transition[] | the moves the server allows from this status, and no others |
Transition status.transitions[] · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Words"Mark as shipped" |
| action* | string | Actionthe page action that moves the record there |
| tone | 'neutral' | 'info' | 'success' | 'warning' | 'danger' | the status colour |
Actions actions · 3 props
| Prop | Type | Description |
|---|---|---|
| primary | Primary | the main button: its words and the page action it runs |
| secondary | Secondary[] | other actions on the record |
| destructive | Destructive | the destructive action: its words and the page action it runs |
Primary actions.primary · 2 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe words on the button or link |
| action* | string | Actiona named action of the page |
Secondary actions.secondary[] · 4 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe words on the button or link |
| action* | string | Actiona named action of the page |
| tone | 'neutral' | 'info' | 'success' | 'warning' | 'danger' | the status colour |
| confirm | Confirm | asked before it runs, as the destructive action is |
Confirm actions.secondary[].confirm · 3 props
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe confirmation’s title |
| text* | string | Wordswhat it does and whether it can be undone |
| confirmLabel* | string | Wordsthe words on the confirming button |
Destructive actions.destructive · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Words"Delete" |
| action* | string | Actiona named action of the page |
| confirm* | Confirm | the question asked before it runs |
Confirm actions.destructive.confirm · 3 props
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe confirmation’s title |
| text* | string | Wordswhat it does and whether it can be undone |
| confirmLabel* | string | Wordsthe words on the confirming button |
Profile profile · 4 props
| Prop | Type | Description |
|---|---|---|
| image | string | Picturea picture of the record (a customer’s portrait) |
| alt | string | Wordswhat the picture shows |
| tag | string | Wordsa short word under the name ("Customer since 2024"), as the merchant stores it |
| counters | Counter[] | stored figures shown on the profile, each a label and a value |
Counter profile.counters[] · 2 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat the value is about |
| value* | string | Wordsa stored figure, written as it should read |
Section sections[] · 4 props
| Prop | Type | Description |
|---|---|---|
| title* | string | Words"Delivery", "Contact" |
| tab | string | Designtabs variant: the tab it belongs to (the first tab when empty) |
| rail | boolean | profile variant: kept in the side rail |
| fields* | Field[] | the form’s fields, in order |
Field sections[].fields[] · 8 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe 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 |
| value | string | number | boolean | unknown | Datathe stored value; money in cents; an empty value shows "—" |
| tone | 'neutral' | 'info' | 'success' | 'warning' | 'danger' | the status colour |
| action | string | Actionopens the linked record |
| record | Record<string, unknown> | Datathe record the action applies to, passed to the host with it, if any |
| options | Option[] | select: the words and tones of the values it may hold |
| file | File | a file held in the field |
Option sections[].fields[].options[] · 3 props
| Prop | Type | Description |
|---|---|---|
| value* | string | Designthe value stored |
| label* | string | Wordsthe value in words, as shown |
| tone | 'neutral' | 'info' | 'success' | 'warning' | 'danger' | the status colour |
File sections[].fields[].file · 2 props
| Prop | Type | Description |
|---|---|---|
| name | string | Wordsthe file’s name, its address’s last part by default |
| size | number | Datain bytes |
Related related[] · 9 props
| Prop | Type | Description |
|---|---|---|
| title* | string | Words"Articles", "Invoices" |
| tab | string | Designtabs variant: the tab it belongs to |
| total | number | Datathe 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 |
| open | string | Actionwhat a row’s first cell leads to |
| all | All | the see-all link: its words and the page action it runs |
| create | Create | the create action: its words and the page action it runs |
| empty | string | Wordswhat an empty list says |
Column related[].columns[] · 3 props
| Prop | Type | Description |
|---|---|---|
| key* | string | Designthe row key to read |
| label* | string | Wordsthe 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
| Prop | Type | Description |
|---|---|---|
| label* | string | Words"See all orders" |
| action* | string | Actiona named action of the page |
Create related[].create · 2 props
| Prop | Type | Description |
|---|---|---|
| label | string | Words"Add a service visit" ("Add" by default) |
| action* | string | Actionopens the form of a record linked to this one; the record carries id |
Activity activity · 4 props
| Prop | Type | Description |
|---|---|---|
| title* | string | Words"History" |
| tab | string | Designtabs variant: the tab it belongs to |
| items* | Item[] | the history’s entries |
| empty | string | Wordswhat an empty history says |
Item activity.items[] · 4 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat happened |
| date* | string | Wordsas the app writes it |
| by | string | Wordswho did it |
| detail | string | Wordsa line of detail |
Statuse statuses[] · 3 props
| Prop | Type | Description |
|---|---|---|
| value* | string | Designthe value a status field stores |
| label* | string | Wordsthe value in words, as shown |
| tone | 'neutral' | 'info' | 'success' | 'warning' | 'danger' | the status colour |
Options options · 2 props
| Prop | Type | Description |
|---|---|---|
| currency | string | DesignISO 4217, EUR by default |
| 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 } |
| go | navigates after a success |
| can | whether the page has this action |
| money | formats a price, given in cents |
| 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:
back,status.transitions[],actions.primary,actions.secondary[],actions.destructive,sections[].fields[],related[].open,related[].all,related[].create - Reads
record,relatedfrom 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
- Detail split: a record read mostly for its linked lists: its fields in a narrow column beside them.
- 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.
- 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.
- Support ticket workspace: A support case desk with the merchant’s own conversation, internal notes, reply macros and customer orders aside.