Skip to content
Klarhimmel UI

Pricing, bar

Pricing, bar previewPricing, bar preview

Install

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

One slim band between two rules: a heading on the left, the price with its period and one button on the right; on a phone they stack and the price and button centre…

Import

Import

import Block from '@/components/klarhimmel/blocks/pricing-bar';
Also called
  • pricing/bar
About
One slim band between two rules: a heading on the left, the price with its period and one button on the right; on a phone they stack and the price and button centre under the heading.
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 slim band between two rules with a heading on the left and the price, its period and one button on the right. Use pricing-single when the plan needs a feature list.

Writing for it

- Write the heading as what the price buys, in a few words. - Give the price and its period in the shortest honest form, such as the amount and per month. - Use one button for the step after the price, such as starting or booking.

Watch out for

On a phone the heading, price and button stack and centre. A band has no room for terms, so anything a buyer needs to know has to sit in a nearby section.

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

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <PricingBar props={{
          "title": "Say in a few words what the visitor gets for this price",
          "price": "Price",
          "period": "Say the billing period",
          "cta": {
            "label": "Say what the button does",
            "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
titlestring'Say in a few words what the visitor…'Text, up to 80 characters.
pricestring'Price'Text, up to 16 characters.
periodstring'Say the billing period'Text, up to 40 characters.
ctaLink{…}See the type.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.