Invoice split — Record block

Free

record-invoice-split · for app, billing, account pages

Invoice split

The merchant’s own invoice with a separate payment summary and actions for collection workflows.

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-invoice-split

Usage

Its demo data, shortened (Using blocks).

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

const props = {
title: "Invoice",
number: "INV-2026-0108",
issuedAt: "October 1, 2026",
dueAt: "October 31, 2026",
seller: {
name: "Management Services",
line1: "18 Weavers Street",
postalCode: "97205",
city: "Portland, OR",
country: "United States",
registration: "Demo company — fictional details"
},
buyer: {
name: "The Neighborhood Shop",
line1: "6 Workshop Lane",
postalCode: "80211",
city: "Denver, CO",
country: "United States"
},
lines: [
{
id: "line-0",
product: {
id: "service-0",
name: "Management workspace subscription"
},
quantity: 1,
unitPrice: 4900,
vatRate: 8.5
},
{
id: "line-1",
product: {
id: "service-1",
name: "Onboarding support"
},
quantity: 2,
unitPrice: 8000,
vatRate: 8.5
}
],
totals: {
subtotal: 22100,
tax: 1777,
total: 23877,
currency: "USD"
},
taxes: [
{
rate: 8.5,
base: 20900,
amount: 1777
},
{
rate: 0,
base: 1200,
amount: 0
}
],
payment: {
status: "unpaid",
label: "Due",
method: "Bank transfer",
remaining: 23877
},
download: "invoice.download",
pay: "invoice.pay",
options: {
note: "Please include the invoice number in your payment reference. Our bank details are on the downloadable document."
}
}
</script>

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

Props

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

PropTypeDescription
title*stringWordsthe section’s heading
number*stringWordsthe invoice’s number
issuedAt*stringWordsformatted issue date supplied by the host
dueAt*stringWordsformatted due date supplied by the host
seller*SellerDatawho bills
buyer*BuyerDatawho is billed
lines*Line[]Datainvoice lines; unitPrice is before VAT in cents
totals*TotalsDataauthoritative invoice totals; subtotal excludes VAT
taxes*Taxe[]Dataauthoritative taxable base and VAT amount in cents for each rate
payment*PaymentDatawhere the payment stands
downloadstringActiona named action of the page
paystringActiona named action of the page
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Seller seller · 9 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
registrationstringWordsthe company registration number
taxNumberstringWordsthe tax number
Buyer buyer · 9 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
registrationstringWordsthe company registration number
taxNumberstringWordsthe tax number
Line lines[] · 9 props
PropTypeDescription
id*string | numberDatathe record’s id in the tool that answers it
product*Productthe product on the line
variantstringWordsthe chosen options, written out ("Navy · 42")
unitPrice*numberan amount in cents
compareAtnumberan amount in cents
quantity*numberhow many, at least 1
maxQuantitynumberthe most the line may hold
notestringWordsa line note: a gift, a delivery delay
vatRate*numberthe VAT rate, 0 to 100
Product lines[].product · 4 props
PropTypeDescription
id*string | numberDatathe record’s id in the tool that answers it
name*stringWordsthe product’s name
imagestring | nullPicturethe main picture; null or absent: the product has none yet
altstringWordswhat the main picture shows
Totals 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
Taxe taxes[] · 3 props
PropTypeDescription
rate*numberthe tax rate, 0 to 100
base*numberthe amount it is computed on, in cents
amount*numberthe tax amount, in cents
Payment payment · 5 props
PropTypeDescription
status*'unpaid' | 'paid' | 'partial' | 'cancelled'the payment’s status: unpaid, paid, partial, cancelled
label*stringWordsthe payment’s name, as shown
methodstringWordshow it was paid, e.g. "Bank transfer"
paidnumberthe amount paid, in cents
remainingnumberthe amount still due, in cents
Options options · 2 props
PropTypeDescription
notestringWordsa short note on 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
moneyformats a price, given in cents
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: download, pay
  • Reads invoice from your app

A record section, for app, billing, account pages; it uses @lucide/vue.

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.
  • 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.
  • 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.
  • Support ticket workspace: A support case desk with the merchant’s own conversation, internal notes, reply macros and customer orders aside.

All 11 record blocks