labsUI
Accent color

Plan Card

One plan or rank at one price: earlier price, note, features and a call to action; PlanGrid lays out several. Server-safe. During a price reduction, `lowestPrice` shows the lowest price from the 30 days before it as visible text; the EU's Omnibus rule (Art. 6a of Directive 98/6) asks for this. A pointer, not legal advice: your app owns the price history and passes it only during a promotion, and no discount percentage is computed.

npx @kznlabs/labsui add plan-card

Iron

A month to try it out.

$9.99for 30 days

  • Iron name colour
  • Chat tag

Gold

Sale

Yours for good.

$149now $129forever

Lowest price in the 30 days before the reduction: $149

  • Gold name colour
  • Chat tag
  • Cosmetic trail
import { PlanCard, PlanGrid } from "@/components/blocks/plan-card";import { buttonVariants } from "@/components/ui/button-variants";export function RankCards() {  return (    <PlanGrid>      <PlanCard        name="Iron"        price={9.99}        note="for 30 days"        features={["Iron name colour"]}        cta={          <a            className={buttonVariants({              variant: "outline",              className: "w-full",            })}            href="/buy/iron"          >            Buy          </a>        }      />      <PlanCard        name="Gold"        price={129}        compareAt={149}        lowestPrice={149}        note="forever"        badge="Sale"        featured        features={["Gold name colour", "Cosmetic trail"]}        cta={          <a            className={buttonVariants({ className: "w-full" })}            href="/buy/gold"          >            Buy          </a>        }      />    </PlanGrid>  );}

<PlanCard>

One plan or rank at one price, no state, so it renders on the server. Several go in a PlanGrid.

  • name required
    string
    Plan name, the card's heading.
  • price required
    ReactNode
    Current price in major units, or your own node (Pricing passes its animated price).
  • badge
    string
    Small label on the card, e.g. "Popular".
  • compareAt
    number
    Struck-through earlier price. Hidden when a numeric price isn't lower.
  • cta
    ReactNode
    Call to action, e.g. <Button className="w-full">Buy</Button>.
  • currency
    string
    ISO 4217 code for the price.
  • description
    ReactNode
    One line under the name.
  • featured
    boolean
    Outlined in the accent.
  • featuresDefault []
    string[]
    What the plan includes, one check mark each.
  • locale
    string
    BCP 47 locale for number formatting.
  • lowestPrice
    number
    Lowest price from the 30 days before a reduction, shown as text under the price. Pass it only during a promotion.
  • lowestPriceLabelDefault "Lowest price in the 30 days before the reduction"
    ReactNode
    Text before lowestPrice. Polish: "Najniższa cena z 30 dni przed obniżką".
  • note
    ReactNode
    Beside the price, e.g. "/ month" or "forever".
  • nowLabelDefault "now"
    string
    Read by screen readers between compareAt and the price.
PropTypeDefault
name required
Plan name, the card's heading.
string—
price required
Current price in major units, or your own node (Pricing passes its animated price).
ReactNode—
badge
Small label on the card, e.g. "Popular".
string—
compareAt
Struck-through earlier price. Hidden when a numeric price isn't lower.
number—
cta
Call to action, e.g. <Button className="w-full">Buy</Button>.
ReactNode—
currency
ISO 4217 code for the price.
string—
description
One line under the name.
ReactNode—
featured
Outlined in the accent.
boolean—
features
What the plan includes, one check mark each.
string[][]
locale
BCP 47 locale for number formatting.
string—
lowestPrice
Lowest price from the 30 days before a reduction, shown as text under the price. Pass it only during a promotion.
number—
lowestPriceLabel
Text before lowestPrice. Polish: "Najniższa cena z 30 dni przed obniżką".
ReactNode"Lowest price in the 30 days before the reduction"
note
Beside the price, e.g. "/ month" or "forever".
ReactNode—
nowLabel
Read by screen readers between compareAt and the price.
string"now"

required

Also accepts every <div> prop.

<PlanGrid>

PlanCards side by side, as many columns as fit.

Also accepts every <div> prop (none of its own).

Every component also takes className.