Pricing, pay as you use


Install
npx shadcn add @klarhimmel/pricing-usageDetailsAbout, usage, props and more
Usage-based pricing: a rate card (what is metered, per unit, how much is free) beside a worked example bill with line items and a total, so nobody has to do the sum.
Import
Import
- pricing/usage
- About
- Usage-based pricing: a rate card (what is metered, per unit, how much is free) beside a worked example bill with line items and a total, so nobody has to do the sum. Use when there is no plan to pick.
- Category
- Plans and prices: tiers, a single plan, a toggle or a comparison table. New project? Set it up once: /get-started/installation.
Notes
When to use it
Usage-based pricing, with a rate card on the left and a worked example bill with a total on the right, so nobody has to do the sum. Use pricing-tiers when buyers pick a plan instead.
Writing for it
- Each rate needs a name, a price (20 characters) and optionally a unit and an included allowance, such as '1 000 free'. - Make the example lines add up to the total, because the block does not calculate it. Two to five lines of 60 characters with amounts of 20. - Title the example by who it is, such as 'A shop with 400 orders a month', so the total is read as a case and not a promise.
Watch out for
The total and every amount are plain text, so a mistake in the sum will print as written. The rates are required to be two to six, and the cta sits under the bill in the right column only.
Pairs well with
Usage
The block in a page, with its default content (long lists shortened). Every prop is in the table below.
Props
The type, default and text limit of every prop. On a real page, over-limit text is kept and checkSections flags it (Installation, Check a page before you ship); this live preview shows the default until it fits. The panel above edits all props.
| Prop | Type | Default | Description |
|---|---|---|---|
eyebrow | string | 'Section name' | Text, up to 60 characters. |
title | string | 'Say what the price is based on' | Text, up to 120 characters. |
description | string | 'Say in one sentence what the price …' | Text, up to 300 characters. |
ratesTitle | string | 'Name the rates' | Text, up to 60 characters. |
rates | { name, unit, price, included }[] | 4 items | List of 2 to 6. Each item: name, unit, price, included. |
exampleTitle | string | 'Name the worked example' | Text, up to 60 characters. |
exampleLines | { label, amount }[] | 3 items | List of 2 to 5. Each item: label, amount. |
totalLabel | string | 'Name the total line' | Text, up to 30 characters. |
total | string | '$00.00' | Text, up to 20 characters. |
note | string | 'Say what the prices exclude and whe…' | Text, up to 160 characters. |
cta | Link | {…} | See the type. |
headingLevel | '1' | '2' | - | One of '1', '2'. Optional; empty is not rendered. |