Skip to content
Haze UI

Pricing: three tiers with featured plan

Three plan panels in one row with equal heights and aligned buttons. The middle plan has a stronger border and a badge.

pnpm dlx shadcn@latest add @haze/pricing-three-tier
Open preview in a new tab
Liveno JavaScript

When to use

  • Self-serve SaaS with a free, a paid and a sales-led plan
  • You want to steer buyers toward one recommended plan

When not to use

  • Buyers need to compare dozens of features line by line; a comparison table works better
  • You offer monthly and yearly billing; add a billing toggle variant

Installation

Add the Haze registry to components.json once, then install Pricing: three tiers with featured plan with the shadcn CLI. Works in any Astro project with Tailwind CSS v4.

pnpm dlx shadcn@latest add @haze/pricing-three-tier
First time? Registry and theme setup

1. Add to components.json:

{
  "registries": {
    "@haze": "http://localhost:4329/r/{name}.json"
  }
}

2. Install the theme once: npx shadcn@latest add @haze/theme, then import it after Tailwind in your global CSS:@import "./haze.css";

API reference

PropTypeDefaultDescription
titlestringdemo headingSection heading (h2).
descriptionstringdemo copyIntro under the heading.
plansPlan[]Free / Team / EnterprisePlan cards: name, price, period, description, features, ctaLabel, ctaHref, featured.
featuredLabelstring"Most popular"Badge text on the featured plan.

Accessibility

  • Plans are a list of h3 cards; the featured plan is marked by a text badge as well as the stronger border, so it does not rely on color.
  • Each CTA has its own visible label (Start free, Start 14-day trial, Contact sales), so links stay distinguishable out of context.

Notes for AI

Copy into Claude Code, Cursor, Codex or any coding agent. Agents can also read the Markdown version of this page.

  • Install and use

    Install the Haze UI block "Pricing: three tiers with featured plan" with `npx shadcn@latest add @haze/pricing-three-tier`. If components.json has no "@haze" registry yet, add "registries": { "@haze": "http://localhost:4329/r/{name}.json" }. If src/styles/haze.css does not exist yet, run `npx shadcn@latest add @haze/theme` once and import it from the global stylesheet after Tailwind. The CLI stops at an overwrite question when a Haze file already exists and differs, even with --yes, and then installs nothing after it: read its output. If the user has not edited their Haze files, re-run with --overwrite to take the registry versions; if they have, ask them before overwriting. Then import PricingThreeTier from "@/components/haze/blocks/pricing-three-tier.astro" (or the relative path) and render it where it fits the page. Keep Haze token classes (bg-background, text-muted-foreground, border-border...) and never hardcode colors. Docs: http://localhost:4329/blocks/pricing-three-tier.md

  • Customize with real content

    Adapt the Haze pricing-three-tier block for our product. Replace the demo values of these props with our real content: title, description, plans, featuredLabel. Keep the layout, the heading level rules and these accessibility details: Plans are a list of h3 cards; the featured plan is marked by a text badge as well as the stronger border, so it does not rely on color. Each CTA has its own visible label (Start free, Start 14-day trial, Contact sales), so links stay distinguishable out of context. Do not add raw color classes; use the Haze tokens.

  • Choose the right block

    Before using pricing-three-tier, check it fits: use it when self-serve saas with a free, a paid and a sales-led plan; you want to steer buyers toward one recommended plan. Avoid it when buyers need to compare dozens of features line by line; a comparison table works better; you offer monthly and yearly billing; add a billing toggle variant.

Dependencies

  • npm: @lucide/astro
  • @haze/badge
  • @haze/button
  • @haze/utils
  • @haze/theme (one-time setup)

Source · Original Haze UI work.

Catalog

↑↓ moveEnter openEsc close

Keyboard shortcuts

CtrlK
Command palette
/
Focus search
←↑→↓
Move between cards
jk
Next / previous card
ci
Copy code / install command (detail page)
[]
Previous / next entry
?
This help
Esc
Close dialog