Skip to content
Klarhimmel UI

Pricing, figure

Pricing, figure previewPricing, figure preview

Install

npx shadcn add https://ui.klarhimmel.com/r/pricing-figure.json
DetailsAbout, usage, props and more

One plan on a plain light section, all centred: a small eyebrow, a heading, the price as a giant display figure that fills most of the width, one line of terms and one…

Import

Import

import Block from '@/components/klarhimmel/blocks/pricing-figure';
Also called
  • pricing/figure
About
One plan on a plain light section, all centred: a small eyebrow, a heading, the price as a giant display figure that fills most of the width, one line of terms and one filled action.
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

One plan on a plain light section, all centred: an eyebrow, a heading, the price as a giant display figure, a line of terms and one filled action. Use pricing-bar for a slimmer band.

Writing for it

- Write the price as one short string. It is drawn as wide as the section allows. - Use the line of terms for the condition that matters most, such as the billing period. - Keep the heading to what the plan is, and let the figure do the rest.

Watch out for

The figure scales with the section width and stays on one line on a phone, so a long price string shrinks until it is hard to read. Keep it to a few characters.

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

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <PricingFigure props={{
          "eyebrow": "Name the plan",
          "title": "Say in a short line what the plan gives the reader",
          "price": "00 000 kr",
          "terms": "Say the billing period, what is excluded and how the reader can leave, in one line.",
          "link": {
            "label": "Say what the visitor does next",
            "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.

PropTypeDefaultDescription
eyebrowstring'Name the plan'Text, up to 30 characters.
titlestring'Say in a short line what the plan g…'Text, up to 80 characters.
pricestring'00 000 kr'Text, up to 12 characters.
termsstring'Say the billing period, what is exc…'Text, up to 160 characters.
linkLink{…}See the type.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.