Two-Plan Comparison Table
A side-by-side comparison table for two plan tiers (e.g. Free vs Premium), each with its own header cell showing the plan name, price, and an upgrade button. Each feature row renders either a check/cross icon for included/excluded, or a plain text value like a usage limit.
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/two-plan-comparison-table.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/feature/feature133.tsx instead.
Usage
The file also exports feature133Demo, 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 { Feature133, feature133Demo } from "@/components/blocks/feature/feature133"; export default function Page() { return <Feature133 {...feature133Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| eyebrow | string | undefined | Small label above the heading; omitted entirely when unset. |
| heading | string | none | Section heading. |
| description | string | undefined | Supporting copy under the heading. |
| plans | [ComparisonPlan, ComparisonPlan] | none | Exactly two plans, rendered left (e.g. Free) and right (e.g. Premium). |
| rows | ComparisonRow[] | none | Feature rows; each cell is either a boolean (renders a check/cross icon) or a string (renders as plain text). |
| className | string | undefined | Extra classes for the outer section element. |
Types
interface ComparisonPlan { name: string; price: string; period?: string; cta: { label: string; href: string }; } interface ComparisonRow { label: string; free: boolean | string; premium: boolean | string; }
Behavior notes
- Plain server component, no interactivity; the plan CTA buttons are inert links (`href="#"` in the demo).
- Uses a real `<table>` with `<thead>`/`<tbody>` and `scope="col"` header cells, not styled divs, so the comparison is announced correctly by screen readers.
- Check and cross marks use semantic tokens only (`text-primary` for included, `text-muted-foreground/40` for excluded), never a literal green or red class.
- The second plan's header button renders with the default (filled) button variant to read as the recommended upgrade; the first plan's uses the outline variant. This is a purely positional convention, not tied to plan identity.
More Feature Blocks
View all →Full-Bleed Workspace Band
Two-column header above a full-bleed image band with a live view switcher, closing on three numbered captions.
Center-Line Journey Timeline
Vertical hairline timeline alternating stages either side, dropping a phone frame on one step.
Figure-Led Evidence Rows
Tall image with a floating before-and-after card, leading into oversized-figure evidence rows.
Staircase Asset Trio
Three image tiles stepping down the page in a staircase, each floating a different live asset.
Sticky Reference List
Sticky heading column beside three labelled groups of checked capabilities, closing on a footnote.
Day Timeline Rows
Hairline rows walking through one working day, stamped with time and a live approval card inline.