Comparison Table
A full feature-matrix table comparing 3-4 plan tiers row by row. Each row is a feature; cells show a Check/X icon for boolean support or a text value like "500GB" vs "Unlimited". Wrapped in a horizontally scrolling container so it stays usable on narrow screens.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/comparison-table.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/pricing/pricing4.tsx instead.
Usage
The file also exports pricing4Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.
import { Pricing4, pricing4Demo } from "@/components/blocks/pricing/pricing4"; export default function Page() { return <Pricing4 {...pricing4Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | undefined | Optional section heading above the table. |
| description | string | undefined | Optional supporting text under the heading. |
| tiers | ComparisonTier[] | none | Column headers: one per plan, each with a price and CTA. |
| rows | ComparisonRow[] | none | Table rows, one per feature, with one value per tier aligned by array index. |
| className | string | none | Extra classes for the outer section element. |
Types
type ComparisonTier = { name: string; price: string; period: string; cta: { label: string; href?: string }; highlighted?: boolean; }; type ComparisonRow = { label: string; values: (boolean | string)[]; // one entry per tier, aligned by index };
Behavior notes
- This is a fully static server component; nothing on the page changes at runtime.
- The table sits inside an overflow-x-auto container with a min-width, so on narrow viewports it scrolls horizontally instead of squeezing columns unreadably.
- A boolean value in a row renders as a Check icon (supported) or a dimmed X icon (not supported); a string value renders as plain text (e.g. a quota like "500GB").
- Each tier's CTA button in the header row is an inert placeholder with href="#", no real checkout or navigation wired up.
More Pricing Blocks
View all →Three Tier Cards
Classic three-column pricing cards with one plan visually highlighted as the recommended choice.
Monthly/Yearly Toggle
Three-tier pricing cards with a real billing-period toggle that switches every displayed price.
Single Plan Highlight
One centered, larger card for a single plan with a big price, full feature list, and a primary CTA.
Enterprise Contact Card
A standard self-serve plan card next to a distinctly-styled Enterprise card with custom-quote messaging.
Pricing With Testimonial
Pricing cards paired with a single customer quote block for social proof, side by side on large screens.
Tabbed Audience Pricing
Pill tabs switch between separate plan sets for different audiences, e.g. individuals vs. teams.