Skip to content
Hazine

Featured Plan with Compact Alternatives

Pro

Pricing section where the most chosen plan fills two thirds of one frame with its price and grouped features, and the other plans stack beside it as compact price deltas. Use when one plan carries most sign-ups.

How it differs. Unequal density by design: one plan is shown in full, the others share a rail in the same frame and are reduced to a signed price delta and one line of difference against it.

Install

pnpm dlx shadcn@latest add @hazine/plan-cards-featured-with-compact-alternatives

Adds 1 file, 2 shadcn primitives (badge, button), 1 Hazine item (@hazine/heading), and 1 package (lucide-react).

First time? Add the registry to components.json
{
  "registries": {
    "@hazine": {
      "url": "https://api.hazine.dev/r/{name}.json",
      "headers": { "Authorization": "Bearer ${HAZINE_TOKEN}" }
    }
  }
}

Set HAZINE_TOKEN in your environment. The token comes with a Pro licence.

Props8

title
string = "One price per technician"
featured
FeaturedPlan = DEFAULT_FEATURED
alternatives
AlternativePlan[] = DEFAULT_ALTERNATIVES
Shown in the order given. With none, the featured plan takes the full width.
example
PlanExample | null = DEFAULT_EXAMPLE
Worked total under the featured price. Pass null for flat pricing.
currency
string = "USD"
ISO 4217 code.
locale
string = "en-US"
recommendedLabel
string = "Most chosen"
Badge text that states the featured plan is the recommended one.
headingLevel
HeadingLevel = 2

Also accepts every prop of Omit<React.ComponentProps<"section">, "title">.

Accessibility

Pattern
Pricing structure, Landmarks and headings
Keyboard
Nothing to operate. The item has no focusable parts.
Screen reader

A section labelled by its heading. The featured plan comes first in the DOM, each plan is an article labelled by its own heading, the recommended state is badge text, features are prefixed with hidden text that says they are included, and each price delta is read as an amount more or less.

Reduced motion
No motion. Colour transitions only.
Checked
Not checked yet. Automated results appear here once CI has run.

Dependencies4

  • badge
  • button
  • @hazine/heading
  • lucide-react

Filled chips are registry items the CLI adds for you. Outlined chips are npm packages.

Tokens shipped0

None. The item is styled by the tokens your theme already has.

Other takes on this1

The same question answered with a different structure.

  • plan cards

    Baseline of the family: independent, equal weight cards in a grid, each with its own full feature list and no shared controls between cards.

    shadcn add @hazine/pricing-table

    Depends on badge, button, card, @hazine/heading, lucide-react

More in Pricing