Summary aside — Billing block

Pro

billing-summary-aside · for settings, account pages

Summary aside

A long invoice history: the plan and next invoice stay in a sticky column beside it

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/billing-summary-aside

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import BillingSummaryAside from '@/components/trame/blocks/billing/billing-summary-aside.vue'

const props = {
plan: {
name: "Team",
description: "Up to 10 members, 50 GB of files.",
price: 4900,
interval: "month",
renewsOn: "November 1, 2026",
status: "active",
statusLabel: "Active",
nextInvoice: 6100
},
meters: [
{
label: "Members",
used: 7,
limit: 10
},
{
label: "Storage",
used: 38,
limit: 50,
unit: "GB"
}
],
payment: {
brand: "Visa",
last4: "4242",
expires: "08/28"
},
invoices: [
{
id: 1000,
number: "FA-2026-0120",
date: "Sep 1",
status: "open",
amount: 4900
},
{
id: 999,
number: "FA-2026-0119",
date: "Aug 1",
status: "paid",
amount: 6100
}
],
actions: {
change: "plans",
cancel: "cancel-subscription",
updatePayment: "payment",
downloadAll: "invoices-archive",
invoices: "invoices",
invoice: "invoice"
}
}
</script>

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

Props

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

PropTypeDescription
plan*PlanDatathe subscription
metersMeter[]Datawhat is consumed against the plan’s limits
paymentPaymentDatathe card on file; absent: none yet
invoicesInvoice[]Datathe invoice history, newest first
actionsActionsthe page actions the block runs, each described below
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Plan plan · 9 props
PropTypeDescription
name*stringWordsthe plan’s name
descriptionstringWordsone line on what it includes
price*numberan amount in cents
interval*stringWordsthe billing period, as written ("month", "year")
renewsOnstringWordsthe next renewal, as the billing provider wrote it
status'active' | 'trial' | 'past_due' | 'cancelling'the plan’s status: active, trial, past_due, cancelling
statusLabelstringWordsthe status written out ("Active", "Trial")
nextInvoicenumberthe total of the next invoice
currencystringDesignISO 4217
Meter meters[] · 4 props
PropTypeDescription
label*stringWordswhat is consumed ("Members")
used*numberhow much is used so far
limitnumber | nullnull or absent: unlimited
unitstringWords"GB", "shipments"…
Payment payment · 4 props
PropTypeDescription
brand*stringWords"Visa"
last4*stringWordsthe last four digits only
expiresstringWordsas written ("08/28")
holderstringWordsthe card holder’s name
Invoice invoices[] · 7 props
PropTypeDescription
id*string | numberthe invoice’s id
number*stringWordsthe invoice’s number
date*stringWordsas the provider wrote it
status*'paid' | 'open' | 'failed' | 'void'the invoice’s status: paid, open, failed, void
statusLabelstringWordsthe status written out ("Paid")
amount*numberan amount in cents
currencystringDesignISO 4217
Actions actions · 6 props
PropTypeDescription
changestringActionchange plan
cancelstringActioncancel; opens the host’s confirmation
updatePaymentstringActiona named action of the page
downloadAllstringActiona named action of the page
invoicesstringActionthe full invoice list
invoicestringActiondownload one invoice (receives the invoice)
Options options · 3 props
PropTypeDescription
footnotestringWordsa line on proration or taxes, as configured
visibleInvoicesnumberhow many invoices are shown before the rest fold
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: actions.change, actions.cancel, actions.updatePayment, actions.downloadAll, actions.invoices, actions.invoice
  • Reads subscription, invoices from your app

A billing section, for settings, account pages; it uses @lucide/vue, @vueuse/core, class-variance-authority, clsx, reka-ui, tailwind-merge.

More billing blocks

  • Payout methods asset kit: Downloadable resources in a document shelf; the merchant’s own only.
  • Payout methods cards: Definition cards for payment methods; the merchant’s own only.
  • Payout methods results wall: Consented partner results as an editorial wall; the merchant’s own only.
  • Plan addons list: a plan with options: active add-ons, those available, and the total of the next invoice.
  • Plan change cards: a settings "Plans" tab: two to four plan cards side by side, the current one marked without a button, one action on each other card.
  • Plan change compare table: plans that differ by many limits and features: the plans as column headers with the billing cycle above, one row per limit or feature; one plan at a time on a phone.
  • Plan change dialog two pane: an upgrade opened by a locked feature, inside the host’s dialog: the chosen plan’s benefits on one side; the plan switch, the billing cycle, the seats, what is due today and then, and one button on the other.

All 9 billing blocks