# Pricing, pay as you use

- **[Sections](/blocks/)**
- **[Pricing](/blocks/pricing/)**
- **Pricing, pay as you use**

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

- **CLI**

  ```
  npx shadcn add @klarhimmel/pricing-usage
  ```
- **Import**

  ```
  import Block from '@/components/klarhimmel/blocks/pricing-usage';
  ```

Also called

- 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

- **[Features, list](/blocks/features/list)**
- **[FAQ, list](/blocks/faq/accordion)**
- **[Contact, form](/blocks/contact/form)**

## Usage

The block in a page, with its default content (long lists shortened). Every prop is in the table below.

section.tsx

```
import { Theme } from '@/components/klarhimmel/theme/style';
import { BlockSurface } from '@/components/klarhimmel/blocks/surface';
import PricingUsage from '@/components/klarhimmel/blocks/pricing-usage';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <PricingUsage props={{
          "eyebrow": "Section name",
          "title": "Say what the price is based on",
          "description": "Say in one sentence what the price covers and what is free.",
          "ratesTitle": "Name the rates",
          "rates": [
            {
              "name": "Name a billed thing",
              "unit": "per unit",
              "price": "$0.00",
              "included": "First 00 free"
            },
            {
              "name": "Name a billed thing",
              "unit": "per unit",
              "price": "$0.00",
              "included": "First 00 free"
            }
          ],
          "exampleTitle": "Name the worked example",
          "exampleLines": [
            {
              "label": "Say what was used, and how much",
              "amount": "$00.00"
            },
            {
              "label": "Say what was used, and how much",
              "amount": "$00.00"
            }
          ],
          "totalLabel": "Name the total line",
          "total": "$00.00",
          "note": "Say what the prices exclude and when the customer is told before being charged.",
          "cta": {
            "label": "Main action",
            "href": "#start"
          }
        }} />
      </BlockSurface>
    </Theme>
  );
}
```

## 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.

- **eyebrow**: Text, up to 60 characters.
- **title**: Text, up to 120 characters.
- **description**: Text, up to 300 characters.
- **ratesTitle**: Text, up to 60 characters.
- **rates**: List of 2 to 6. Each item: name, unit, price, included.
- **exampleTitle**: Text, up to 60 characters.
- **exampleLines**: List of 2 to 5. Each item: label, amount.
- **totalLabel**: Text, up to 30 characters.
- **total**: Text, up to 20 characters.
- **note**: Text, up to 160 characters.
- **cta**: See the type.
- **headingLevel**: One of '1', '2'. Optional; empty is not rendered.

[Previous](/blocks/pricing/toggle)

[Next](/blocks/faq/banner-list)
