Customer case view stacked — Record block

Pro

record-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-stacked

Usage

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.

PropTypeDescription
title*stringWordsthe section’s heading
ticket*TicketDatathe open customer ticket; the host must omit staff-only data for customer viewers, and customer-view also excludes internal notes from its rendered HTML
replystringActionPOST endpoint accepting ticketId and body
notestringActionPOST endpoint accepting ticketId and body; only for authorised staff
orderActionstringActiona named action of the page
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Ticket ticket · 9 props
PropTypeDescription
id*stringDatathe ticket’s id
subject*stringWordswhat the ticket is about, in a line
status*stringWordsits status in the host’s words, e.g. "Open"
priority*stringWordsits priority in the host’s words, e.g. "High"
openedAt*stringWordswhen it was opened, as the host writes it
requester*Requesterthe customer who opened it
assigneeAssigneethe team member it is assigned to
messages*Message[]Datathe conversation, oldest first
ordersOrder[]Datathe customer’s orders, for context
Requester ticket.requester · 7 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
emailstringWordsthe customer’s email address
Assignee ticket.assignee · 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
Message ticket.messages[] · 5 props
PropTypeDescription
id*stringDatathe message’s id
author*Authorwho wrote it
at*stringWordswhen it was written, as the host writes it
body*stringWordsthe 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
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
Order ticket.orders[] · 9 props
PropTypeDescription
id*string | numberDatathe record’s id in the tool that answers it
number*stringWordsthe order’s number as the shop shows it
date*stringWordsthe date as the shop writes it
status*'pending' | 'paid' | 'preparing' | 'shipped' | 'delivered' | 'cancelled' | 'returned' | 'refunded'where the order stands
statusLabelstringWordsthe 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*Totalsthe order’s amounts
shippingAddressShippingAddresswhere it is delivered
trackingTrackingthe carrier’s tracking, once shipped
Totals ticket.orders[].totals · 11 props
PropTypeDescription
subtotal*numberan amount in cents
discountnumberan amount in cents
discountLabelstringWordswhat the discount is, e.g. a code’s name
shippingnumber | nullnull: computed at the next step
shippingLabelstringWordsthe delivery method, e.g. "Standard delivery"
feesnumberfees the shop charges on top (service, handling), when it does
feesLabelstringWordswhat the fees are ("Service fee")
taxnumberan amount in cents
taxIncludedbooleantrue: the prices include tax
total*numberan amount in cents
currencystringDesignISO 4217, EUR by default
ShippingAddress ticket.orders[].shippingAddress · 7 props
PropTypeDescription
name*stringWordsthe recipient’s name
line1*stringWordsstreet and number
line2stringWordsa second address line: building, floor
postalCode*stringWordsthe postcode
city*stringWordsthe town
country*stringWordsthe country
phonestringWordsa phone number for the delivery
Tracking ticket.orders[].tracking · 4 props
PropTypeDescription
carrierstringWordswho carries it, e.g. "Colissimo"
numberstringWordsthe carrier’s tracking number
urlstringDesignthe carrier’s tracking page
eventsEvent[]the carrier’s tracking events
Event ticket.orders[].tracking.events[] · 4 props
PropTypeDescription
date*stringWordswhen it happened, as the carrier writes it
label*stringWordswhat happened, e.g. "Out for delivery"
placestringWordswhere it happened
done*booleantrue: this event has happened
Options options · 3 props
PropTypeDescription
canNotebooleantrue: the team can add an internal note
footnotestringWordsa small line at the foot of the section
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
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: reply, note, orderAction
  • Reads tickets from 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.

All 11 record blocks