Pricing: single plan with inclusions
One plan pairs a price and action with an adjacent list of included features.
pnpm dlx shadcn@latest add @haze/pricing-single-plan---
import { ArrowRight, Check } from "@lucide/astro";
import { cn } from "../../../lib/haze/utils";
import Button from "../ui/button.astro";
interface Props {
id?: string;
eyebrow?: string;
title?: string;
description?: string;
headingLevel?: 1 | 2 | 3;
planName?: string;
price?: string;
period?: string;
priceNote?: string;
actionLabel?: string;
actionHref?: string;
features?: string[];
class?: string;
}
const {
id = "pricing-single-plan",
eyebrow = "A straightforward plan",
title = "Everything your team needs to get moving",
description = "One shared workspace, with the essentials to plan, discuss and deliver together.",
headingLevel = 2,
planName = "Workspace",
price = "$24",
period = "per workspace / month",
priceNote = "Example price for this preview",
actionLabel = "See what's included",
actionHref,
features = ["Projects and shared milestones", "Unlimited notes and decisions", "Activity updates in one place", "Invite the people you work with", "Export your workspace data", "Help from our support team"],
class: className,
} = Astro.props;
const Heading = ({ 1: "h1", 2: "h2", 3: "h3" } as const)[headingLevel];
---
<section aria-labelledby={`${id}-title`} class={cn("bg-background px-6 py-20 sm:py-24", className)}>
<div class="mx-auto max-w-6xl">
<div class="max-w-2xl">
<p class="text-[0.6875rem]/4 font-medium tracking-wider text-muted-foreground uppercase">{eyebrow}</p>
<Heading id={`${id}-title`} class="mt-3 text-3xl/9 font-semibold tracking-tight text-balance text-foreground sm:text-4xl/11">{title}</Heading>
<p class="mt-4 text-base/7 text-pretty text-muted-foreground">{description}</p>
</div>
<div class="mt-10 overflow-hidden rounded-2xl border border-border bg-card md:grid md:grid-cols-[minmax(0,1fr)_minmax(0,1.5fr)]">
<div class="bg-muted/40 p-7 sm:p-9">
<p class="text-sm/5 font-semibold text-foreground">{planName}</p>
<p class="mt-6 flex flex-wrap items-baseline gap-x-2 gap-y-1"><span class="text-4xl/10 font-semibold tracking-tight text-foreground tabular-nums">{price}</span><span class="text-sm/6 text-muted-foreground">{period}</span></p>
{priceNote && <p class="mt-2 text-[0.8125rem]/5 text-muted-foreground">{priceNote}</p>}
<div class="mt-7"><Button href={actionHref || `#${id}-features`}>{actionLabel}<ArrowRight aria-hidden="true" class="size-4" /></Button></div>
</div>
<div id={`${id}-features`} class="border-t border-border p-7 sm:p-9 md:border-t-0 md:border-l">
<p class="text-[0.6875rem]/4 font-medium tracking-wider text-muted-foreground uppercase">Included in your workspace</p>
<ul class="mt-5 grid gap-x-6 gap-y-4 sm:grid-cols-2">
{features.map((feature) => <li class="flex items-start gap-3 text-sm/6 text-foreground"><Check aria-hidden="true" class="mt-1 size-4 shrink-0 text-muted-foreground" />{feature}</li>)}
</ul>
</div>
</div>
</div>
</section>When to use
- A product has one straightforward self-serve offer
- Buyers need to see the price and included capabilities together
When not to use
- Several plans need side-by-side comparison; use pricing-three-tier
Installation
Add the Haze registry to components.json once, then install Pricing: single plan with inclusions with the shadcn CLI. Works in any Astro project with Tailwind CSS v4.
pnpm dlx shadcn@latest add @haze/pricing-single-plannpx shadcn@latest add @haze/pricing-single-planyarn dlx shadcn@latest add @haze/pricing-single-planbunx --bun shadcn@latest add @haze/pricing-single-planFirst 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
| Prop | Type | Default | Description |
|---|---|---|---|
| id | string | "pricing-single-plan" | Unique section and features anchor prefix. |
| eyebrow | string | "A straightforward plan" | Label above the heading. |
| title | string | demo heading | Pricing section heading. |
| description | string | demo copy | Short explanation of the offer. |
| headingLevel | 1 | 2 | 3 | 2 | Heading level for the page context. |
| planName | string | "Workspace" | Name of the plan. |
| price | string | "$24" | Display price; the default is an example. |
| period | string | "per workspace / month" | Billing unit shown with the price. |
| priceNote | string | "Example price for this preview" | Supporting price note; replace it with real terms. |
| actionLabel | string | "See what's included" | Text for the plan action. |
| actionHref | string | – | Action destination; defaults to the included features. |
| features | string[] | 6 example features | Included plan features. |
| class | string | – | Additional section classes. |
Keyboard interactions
- Tab, Enter
- Focus and follow the plan action.
Accessibility
- The price, billing unit and example note are visible text, and inclusions form a semantic list.
- The default link moves to the feature list; provide a real destination and matching label for checkout.
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: single plan with inclusions" with `npx shadcn@latest add @haze/pricing-single-plan`. 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 PricingSinglePlan from "@/components/haze/blocks/pricing-single-plan.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-single-plan.md
Customize with real content
Adapt the Haze pricing-single-plan block for our product. Replace the demo values of these props with our real content: id, eyebrow, title, description, headingLevel, planName, price, period, priceNote, actionLabel, actionHref, features, class. Keep the layout, the heading level rules and these accessibility details: The price, billing unit and example note are visible text, and inclusions form a semantic list. The default link moves to the feature list; provide a real destination and matching label for checkout. Do not add raw color classes; use the Haze tokens.
Choose the right block
Before using pricing-single-plan, check it fits: use it when a product has one straightforward self-serve offer; buyers need to see the price and included capabilities together. Avoid it when several plans need side-by-side comparison; use pricing-three-tier. Alternatives: @haze/pricing-three-tier, @haze/comparison-plan-matrix.
Dependencies
- npm: @lucide/astro
- @haze/button
- @haze/utils
- @haze/theme (one-time setup)
Source · Original Haze UI work.