Plan addons list — Billing block
Probilling-plan-addons-list · for settings, account pages
Plan addons list
A plan with options: active add-ons, those available, and the total of the next invoice
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-plan-addons-listUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import BillingPlanAddonsList from '@/components/trame/blocks/billing/billing-plan-addons-list.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: 8500
},
payment: {
brand: "Visa",
last4: "4242",
expires: "08/28"
},
addons: [
{
id: "sso",
name: "Single sign-on (SSO)",
description: "SAML for the whole team.",
price: 1500,
interval: "month",
active: true,
actionLabel: "Remove"
},
{
id: "storage",
name: "100 GB of storage",
price: 900,
interval: "month",
active: true,
actionLabel: "Remove"
}
],
actions: {
updatePayment: "payment",
addon: "toggle-addon"
},
options: {
footnote: "An add-on started mid-period is prorated for the days remaining."
}
}
</script>
<template>
<BillingPlanAddonsList v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| plan* | Plan | Datathe subscription the add-ons belong to |
| payment | Payment | Datathe card on file; absent: none yet |
| addons* | Addon[] | Dataactive and available add-ons |
| actions | Actions | the page actions the block runs, each described below |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Plan plan · 9 props
| Prop | Type | Description |
|---|---|---|
| name* | string | Wordsthe plan’s name |
| description | string | Wordsone line on what it includes |
| price* | number | an amount in cents |
| interval* | string | Wordsthe billing period, as written ("month", "year") |
| renewsOn | string | Wordsthe next renewal, as the billing provider wrote it |
| status | 'active' | 'trial' | 'past_due' | 'cancelling' | the plan’s status: active, trial, past_due, cancelling |
| statusLabel | string | Wordsthe status written out ("Active", "Trial") |
| nextInvoice | number | the total of the next invoice |
| currency | string | DesignISO 4217 |
Payment payment · 4 props
| Prop | Type | Description |
|---|---|---|
| brand* | string | Words"Visa" |
| last4* | string | Wordsthe last four digits only |
| expires | string | Wordsas written ("08/28") |
| holder | string | Wordsthe card holder’s name |
Addon addons[] · 7 props
| Prop | Type | Description |
|---|---|---|
| id* | string | number | the addon’s id |
| name* | string | Wordsthe addon’s name |
| description | string | Wordsthe addon’s description |
| price* | number | an amount in cents |
| interval | string | Words"month" |
| active* | boolean | true: the one selected now |
| actionLabel | string | Wordswhat the button says ("Turn on", "Remove") |
Actions actions · 2 props
| Prop | Type | Description |
|---|---|---|
| updatePayment | string | Actiona named action of the page |
| addon | string | Actiontoggle an add-on (receives the add-on) |
Options options · 2 props
| Prop | Type | Description |
|---|---|---|
| footnote | string | Wordsa line on proration or taxes, as configured |
| 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 |
| money | formats a price, given in cents |
| 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:
actions.updatePayment,actions.addon - Reads
subscriptionfrom 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 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.
- Stack: the whole subscription in one centred column: plan and usage, payment method, invoices.
- Summary aside: a long invoice history: the plan and next invoice stay in a sticky column beside it.