Dashral Pro is on the wayGet 30% off at launch

Dashral

Pricing comparison

Plans compared feature by feature in groups, with hints, the popular column tinted, and actions in the header.

$ pnpm dlx shadcn@latest add @dashral/pricing-comparison

When to use

  • Plans compared feature by feature in groups, with hints and the popular column tinted.
  • Under the tiers on a pricing page, for people who read every line.

When not to use

  • Plans that differ in two or three ways: the tiers' own lists already say it.
  • The top of a pricing page: lead with Pricing tiers, and put this under them.

Usage

Pricing comparison with your own data: every prop has the sample as its default, so pass only what you have.

example.tsx
import { PricingComparison } from "@/components/dashral/blocks/pricing-comparison"

<PricingComparison
  plans={plans}
  groups={featureGroups}
  onSelect={(plan) => checkout(plan.name)}
/>

API reference

PricingComparison

Plans compared feature by feature: a header row with each plan's price and action, groups of rows, a hint on the features that need one, and the popular plan's column tinted. Scrolls sideways on phones, the feature names staying in place. Every part comes from props.

PropTypeDefault
eyebrowReact.ReactNode"Compare plans"
titleReact.ReactNodesample
plansComparePlan[]sample
groupsCompareGroup[]sample
perstring

After each price.

"/ month"
onSelect(plan: ComparePlan) => void—

type ComparePlan

A plan's column: its name, its price a month as shown, and its button (a link, or onSelect without one).

PropTypeDefault
namestring—
pricestring—
popularboolean—
ctastring—
hrefstring—

type CompareValue

Included (true), not (false), or what it comes with ("20").

= boolean | string

type CompareGroup

A group of rows; each row has one value per plan, in the plans' order.

PropTypeDefault
titlestring—
rows{ feature: string; hint?: string; values: CompareValue[] }[]—