Plans title aside — Pricing block

Free

pricing-plans-title-aside · for home, landing, app pages

Plans title aside

One or two offers whose argument deserves as much room as the price: the title, lead, period switch and footnote in a sticky column at the left, each offer a wide card at the right with its inclusions in two columns

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-plans-title-aside

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import PricingPlansTitleAside from '@/components/trame/blocks/pricing/pricing-plans-title-aside.vue'

const props = {
eyebrow: "Prooflane pricing",
title: "One price per developer, and every pull request reviewed",
lead: "Pick the plan that fits your team today. Switch whenever you like, and pay only for the seats you use.",
plans: [
{
name: "Team",
audience: "For product teams that ship every day.",
prices: {
monthly: 2900,
yearly: 29000
},
note: "14-day trial, no credit card needed.",
lead: "Everything in Solo, plus",
features: [
"Unlimited repositories",
"Review rules per team"
],
meters: [
{
label: "Reviews per month",
value: "Unlimited",
fill: 100
},
{
label: "Preview build minutes",
value: "10,000",
fill: 62
}
],
badge: "Most popular",
highlighted: true,
action: {
label: "Try Team",
action: "signup",
record: {
id: "team"
}
}
},
{
name: "Enterprise",
audience: "Your own cloud, regulated industries, high volumes.",
priceLabel: "Quote on request",
features: [
"Runs in your own cloud",
"Data stays in your region"
],
action: {
label: "Talk to the team",
action: "contact"
}
}
],
periods: [
{
key: "monthly",
label: "Monthly"
},
{
key: "yearly",
label: "Yearly",
saving: "2 months free"
}
],
footnote: "Prices are per developer seat per month and exclude tax. Yearly plans are billed once."
}
</script>

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

Props

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

PropTypeDescription
eyebrowstringWordswhat this is ("Pricing")
title*stringWordsthe section’s title, in a few words ("A clear price, no surprises")
leadstringWordsone or two sentences under the title: who the offers are for, what they all include
plans*Plan[]the plans, each with its prices and features
periodsPeriod[]the billing periods to choose from, e.g. "Monthly"
footnotestringWordssmall print under the offers (taxes, trial, cancellation)
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Plan plans[] · 13 props
PropTypeDescription
name*stringWordsthe offer’s name ("Essential")
audiencestringWordswho it is for, one line
pricenumberDatathe price in cents when there is no period toggle
pricesRecord<string, number>Datathe price in cents for each period key, as the merchant set it
priceLabelstringWordswords instead of an amount ("Free", "On quote")
unitstringWordswhat the price is per when there is no period toggle ("/ month", "once")
notestringWordsa line under the price ("billed €190 a year", "no commitment"), as the merchant wrote it
leadstringWordsthe line before the list ("Everything in Essential, plus")
featuresstring[]Wordsone inclusion
metersMeter[]meters: the quotas this offer sets, drawn as meters, when the offers differ by volume more than by features
badgestringWordsthe merchant’s own mark for this offer ("Most chosen")
highlightedbooleantrue: the plan the merchant recommends, set apart
actionActionthe plan’s call to action: its words and the page action
Meter plans[].meters[] · 3 props
PropTypeDescription
label*stringWordswhat the quota counts ("Products", "Accounts")
value*stringWordsthe quota as the merchant writes it ("100", "Unlimited")
fill*numberDatahow full the meter is drawn, 0 to 100, chosen to suggest the order of the offers
Action plans[].action · 3 props
PropTypeDescription
label*stringWordswhat happens ("Choose Pro")
action*stringActiona named action of the page
recordRecord<string, unknown>Datathe record the action opens, if any
Period periods[] · 4 props
PropTypeDescription
key*stringDesignthe period’s key, the one used in each plan’s prices ("monthly", "yearly")
label*stringWordsthe toggle’s word ("Monthly")
savingstringWordsthe saving, only as the merchant states it ("2 months free")
unitstringWordswhat the price is per in this period; empty uses the interface’s "/ month" for monthly and "/ year" for yearly
Options options · 3 props
PropTypeDescription
defaultPeriodstringDesignthe period key shown first and without JavaScript; the first period by default
highlightbooleanthe highlighted offer wears a brand gradient border; at the app’s expressive level a light runs once round it when it appears and once on hover, never in a loop
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
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
  • Expressive motion, within its budget; still under reduced motion
  • Real buttons and links, a visible focus
  • Asks your app through actions: plans[].action

A pricing section, for home, landing, app pages; it uses @lucide/vue, class-variance-authority, clsx, motion, reka-ui, tailwind-merge.

Built with

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

More pricing blocks

  • Offer matrix table: the full grid of offers against features, ticks and short values, for visitors who compare line by line — the merchant’s own only.
  • 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.
  • Savings calculator ledger: one wide card, the visitor’s volume and cost on the left, a muted panel on the right with the net saving very large over its breakdown: a product whose price is easiest to justify by the work it replaces — the merchant’s own fee only.
  • 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.
  • 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.

All 32 pricing blocks