Customer case view stacked — Record block
Prorecord-customer-case-view-stacked · for account, support pages
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.
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-customer-case-view-stackedUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import RecordCustomerCaseViewStacked from '@/components/trame/blocks/record/record-customer-case-view-stacked.vue'
const props = {
title: "Request follow-up",
ticket: {
id: "DOS-108",
subject: "An item arrived damaged",
status: "Waiting on customer",
priority: "Normal",
openedAt: "October 8, 2026 · 9:00 a.m.",
requester: {
id: "client-0",
name: "Camille Durand",
email: "[email protected]"
},
assignee: {
name: "Nadia Roussel"
},
messages: [
{
id: "message-0",
author: {
name: "Camille Durand",
role: "Requester"
},
kind: "customer",
at: "Oct 8 · 9:00 a.m.",
body: "Hello, one of the mugs in my order arrived with a broken handle. Could you tell me how to get a replacement?"
},
{
id: "message-1",
author: {
name: "Nadia Roussel",
role: "Customer service"
},
kind: "reply",
at: "Oct 8 · 9:15 a.m.",
body: "Hello, we’ll look into your request. Could you reply to this message with a photo of the mug and its packaging?"
}
],
orders: [
{
id: "order-0",
number: "CMD-2048",
date: "October 5, 2026",
status: "delivered",
statusLabel: "Delivered",
lines: [
{
id: "line-1",
product: {
id: "cup",
name: "Stoneware mug, natural glaze"
},
quantity: 2,
unitPrice: 2400
}
],
totals: {
subtotal: 4800,
total: 4800,
currency: "USD"
}
}
]
},
reply: "ticket.reply",
note: "ticket.note",
orderAction: "order.detail",
options: {
canNote: true,
footnote: "Canned replies stay drafts to proofread before sending."
}
}
</script>
<template>
<RecordCustomerCaseViewStacked v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe section’s heading |
| ticket* | Ticket | Datathe open customer ticket; the host must omit staff-only data for customer viewers, and customer-view also excludes internal notes from its rendered HTML |
| reply | string | ActionPOST endpoint accepting ticketId and body |
| note | string | ActionPOST endpoint accepting ticketId and body; only for authorised staff |
| orderAction | string | Actiona named action of the page |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Ticket ticket · 9 props
| Prop | Type | Description |
|---|---|---|
| id* | string | Datathe ticket’s id |
| subject* | string | Wordswhat the ticket is about, in a line |
| status* | string | Wordsits status in the host’s words, e.g. "Open" |
| priority* | string | Wordsits priority in the host’s words, e.g. "High" |
| openedAt* | string | Wordswhen it was opened, as the host writes it |
| requester* | Requester | the customer who opened it |
| assignee | Assignee | the team member it is assigned to |
| messages* | Message[] | Datathe conversation, oldest first |
| orders | Order[] | Datathe customer’s orders, for context |
Requester ticket.requester · 7 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 |
| string | Wordsthe customer’s email address |
Assignee ticket.assignee · 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 |
Message ticket.messages[] · 5 props
| Prop | Type | Description |
|---|---|---|
| id* | string | Datathe message’s id |
| author* | Author | who wrote it |
| at* | string | Wordswhen it was written, as the host writes it |
| body* | string | Wordsthe message itself |
| kind* | 'customer' | 'reply' | 'internal' | customer: from the customer; reply: the team’s answer; internal: a note the customer does not see |
Author ticket.messages[].author · 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 |
Order ticket.orders[] · 9 props
| Prop | Type | Description |
|---|---|---|
| id* | string | number | Datathe record’s id in the tool that answers it |
| number* | string | Wordsthe order’s number as the shop shows it |
| date* | string | Wordsthe date as the shop writes it |
| status* | 'pending' | 'paid' | 'preparing' | 'shipped' | 'delivered' | 'cancelled' | 'returned' | 'refunded' | where the order stands |
| statusLabel | string | Wordsthe status in the shop’s words, instead of the block’s own |
| lines* | (Line | Line)[] | full cart lines, or summaries (name, quantity, total) when the tool keeps only those |
| totals* | Totals | the order’s amounts |
| shippingAddress | ShippingAddress | where it is delivered |
| tracking | Tracking | the carrier’s tracking, once shipped |
Totals ticket.orders[].totals · 11 props
| Prop | Type | Description |
|---|---|---|
| subtotal* | number | an amount in cents |
| discount | number | an amount in cents |
| discountLabel | string | Wordswhat the discount is, e.g. a code’s name |
| shipping | number | null | null: computed at the next step |
| shippingLabel | string | Wordsthe delivery method, e.g. "Standard delivery" |
| fees | number | fees the shop charges on top (service, handling), when it does |
| feesLabel | string | Wordswhat the fees are ("Service fee") |
| tax | number | an amount in cents |
| taxIncluded | boolean | true: the prices include tax |
| total* | number | an amount in cents |
| currency | string | DesignISO 4217, EUR by default |
ShippingAddress ticket.orders[].shippingAddress · 7 props
| Prop | Type | Description |
|---|---|---|
| name* | string | Wordsthe recipient’s name |
| line1* | string | Wordsstreet and number |
| line2 | string | Wordsa second address line: building, floor |
| postalCode* | string | Wordsthe postcode |
| city* | string | Wordsthe town |
| country* | string | Wordsthe country |
| phone | string | Wordsa phone number for the delivery |
Tracking ticket.orders[].tracking · 4 props
| Prop | Type | Description |
|---|---|---|
| carrier | string | Wordswho carries it, e.g. "Colissimo" |
| number | string | Wordsthe carrier’s tracking number |
| url | string | Designthe carrier’s tracking page |
| events | Event[] | the carrier’s tracking events |
Event ticket.orders[].tracking.events[] · 4 props
| Prop | Type | Description |
|---|---|---|
| date* | string | Wordswhen it happened, as the carrier writes it |
| label* | string | Wordswhat happened, e.g. "Out for delivery" |
| place | string | Wordswhere it happened |
| done* | boolean | true: this event has happened |
Options options · 3 props
| Prop | Type | Description |
|---|---|---|
| canNote | boolean | true: the team can add an internal note |
| footnote | string | Wordsa small line at the foot of the section |
| 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 |
| 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:
reply,note,orderAction - Reads
ticketsfrom your app
A record section, for account, support pages; it uses @lucide/vue, @vueuse/core, class-variance-authority, clsx, tailwind-merge.
More record blocks
- Detail page: a record read top to bottom: header with its status and actions, fields in sections, linked lists beneath.
- 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.
- 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.