Skip to content
Klarhimmel UI

Pricing, three tiers

Pricing, three tiers previewPricing, three tiers preview

Install

npx shadcn add @klarhimmel/pricing-tiers
DetailsAbout, usage, props and more

Up to three plans side by side with price, feature list and a button. One can be featured.

Import

Import

import Block from '@/components/klarhimmel/blocks/pricing-tiers';
Also called
  • pricing/tiers
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

Up to three plans side by side with a price, a feature list and a button, one of which can be featured. Use pricing-toggle if buyers should switch between monthly and yearly prices, and pricing-rows when there are four plans.

Writing for it

- Each tier has a price of up to 16 characters and a period of 24. Put the currency in the price and a plain 'per month' in the period. - Feature lists hold up to eight lines of 80 characters. Keep the same features in the same order across the tiers so they can be compared by eye. - The tier description (120 characters) has a reserved two-line height. Fill it in on every tier so the prices line up.

Watch out for

The three columns appear only on wide containers, and one or two tiers still occupy their own third of the row. The featured flag changes the border and the button style but not the size, so do not rely on it alone to point to a plan.

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 PricingTiers from '@/components/klarhimmel/blocks/pricing-tiers';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <PricingTiers props={{
          "eyebrow": "Section name",
          "title": "Say how the plans are chosen",
          "description": "Say in one sentence what every plan includes and what the choice is about.",
          "tiers": [
            {
              "name": "First plan",
              "price": "$00",
              "period": "billing period",
              "description": "Say who this plan suits in one line",
              "features": [
                "Name a first feature",
                "Name a feature"
              ],
              "cta": {
                "label": "Main action",
                "href": "#start"
              },
              "featured": false
            },
            {
              "name": "Second plan",
              "price": "$00",
              "period": "per unit, per period",
              "description": "Say who this plan suits in one line",
              "features": [
                "Name a first feature",
                "Name a second feature"
              ],
              "cta": {
                "label": "Main action",
                "href": "#trial"
              },
              "featured": true
            }
          ]
        }} />
      </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.

PropTypeDefaultDescription
eyebrowstring'Section name'Text, up to 60 characters.
titlestring'Say how the plans are chosen'Text, up to 120 characters.
descriptionstring'Say in one sentence what every plan…'Text, up to 300 characters.
align'start' | 'center'-One of 'start', 'center'. Optional; empty is not rendered.
bandboolean-Optional; empty is not rendered.
headerActionLink-Optional; empty is not rendered.
ctaPosition'price' | 'foot'-One of 'price', 'foot'. Optional; empty is not rendered.
largePriceboolean-Optional; empty is not rendered.
titleSize'title' | 'display'-One of 'title', 'display'. Optional; empty is not rendered.
compare{ title, rows }-Fields: title (optional), rows (optional). Optional; empty is not rendered.
tiers{ name, price, period, description, features, cta, featured }[]3 itemsList of 1 to 6. Each item: name, price, period, description, features, cta, featured.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.