Savings calculator stacked — Pricing block

Pro

pricing-savings-calculator-stacked · for landing, home, pricing pages

Savings calculator stacked

The two questions side by side above a dark band that writes the sum as one line (volume × cost − fee = net): a page that wants the arithmetic itself to be the argument, in a narrower column.

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/pricing-savings-calculator-stacked

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import PricingSavingsCalculatorStacked from '@/components/trame/blocks/pricing/pricing-savings-calculator-stacked.vue'

const props = {
eyebrow: "Savings calculator",
title: "See what automated reporting gives back every month",
intro: "Tell us how many reports your team assembles by hand and what one costs you. We do the arithmetic with our real price.",
volume: {
question: "How many client reports does your team build each week?",
unit: "reports",
unitOne: "report",
min: 1,
max: 60,
step: 1,
default: 10,
period: "week"
},
unitCost: {
question: "What does one report cost you today?",
default: 4500
},
fee: {
label: "Pro plan",
amount: 14900,
period: "month"
},
action: {
label: "Start your free trial",
action: "signup"
}
}
</script>

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

Props

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

PropTypeDescription
eyebrowstringWordswhat this is ("Savings calculator")
title*stringWordsthe section’s title ("See what you save every month")
introstringWordsone or two sentences under the title
volume*Volumethe question on how many units the visitor handles
unitCost*UnitCostthe question on what one unit costs the visitor today
fee*Feethe merchant’s plan and its price
formulastringWordsthe rule in words under the breakdown, as the merchant writes it; a sentence built from the labels when absent
actionActionthe call to action: its words and the page action it runs
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Volume volume · 8 props
PropTypeDescription
question*stringWordswhat the visitor is asked ("How many reports do you build by hand?")
unit*stringWordswhat the volume counts, plural ("reports")
unitOnestringWordsthe same word for one ("report"); the plural when absent
min*numberDatathe lowest volume on the slider
max*numberDatathe highest volume on the slider
stepnumberDatathe step between volumes; 1 when absent
default*numberDatathe volume shown first, and used by the server render
period*'week' | 'month'the volume is counted per week (× 4.33 for a month) or per month
UnitCost unitCost · 3 props
PropTypeDescription
question*stringWordswhat the visitor is asked ("What does one report cost you today?")
default*numberDatathe cost of one unit shown first, in cents of the app’s currency
editablebooleanfalse: the cost is the merchant’s stated figure, shown but not changed; editable by default
Fee fee · 3 props
PropTypeDescription
label*stringWordsthe merchant’s plan, as the breakdown names it ("Pro plan")
amount*numberDatathe plan’s real price, in cents: the merchant’s own only
period'month'the fee is a monthly price
Action action · 3 props
PropTypeDescription
label*stringWordswhat happens ("Try for free")
action*stringActiona named action of the page
recordRecord<string, unknown>Datathe record the action opens, if any
Options options · 1 props
PropTypeDescription
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
  • Subtle motion: one short reveal; still under reduced motion
  • Real buttons and links, a visible focus
  • Asks your app through actions: action

A pricing section, for landing, home, pricing pages; it uses @vueuse/core, class-variance-authority, clsx, reka-ui, tailwind-merge.

Built with

The components this block is made of; each one installs on its own too.

More pricing blocks

  • Plans with enterprise strip: 3 priced offers plus a slim strip for the one on request, so the grid never mixes a price and no price.
  • Price calculator curve: the price headline beside the rate curve with the visitor’s point on it: volume pricing — the merchant’s own only.
  • Price calculator receipt: the inputs beside an itemised receipt with a large total: an offer priced from several quantities — the merchant’s own only.
  • Price calculator slider plan: one slider mapped to the merchant’s bands, a compact card naming the band reached: usage-based tiers.
  • Ticket tiers cards: tiers as cards that say what each includes: fares that differ by more than their price (VIP, pass, workshop).
  • Ticket tiers list: a few tiers read as rows, a stepper on each: a concert or a talk with plain full, reduced and group fares.
  • Trial offer split: Steps beside the exact offer and terms supplied by the merchant; the merchant’s own only.; the merchant’s own only.
  • Trial timeline horizontal: A short reassurance journey across a line, vertical on phones; the merchant’s own only.; the merchant’s own only.

All 32 pricing blocks