PixelDosa UI

Feature Comparison

Compare a few plans or products in a responsive, accessible table.

Choose the right way to work

A quick comparison of the capabilities teams ask about most.

Choose the right way to work
CapabilityStarterTeamScale
ProjectsUp to 3UnlimitedUnlimited
Version history7 days90 daysCustom
SupportCommunityPriorityDedicated

Installation

bash
npx shadcn@latest add @pixeldosa/feature-comparison

Requires `cn` at `@/lib/utils`. Feature values are rendered as provided; format labels and accessible descriptions for icon-only or abbreviated values in the consuming app.

Usage

<FeatureComparison
  title="Choose the right way to work"
  plans={[{ id: "starter", name: "Starter" }, { id: "team", name: "Team" }]}
  features={[
    { id: "projects", label: "Projects", values: { starter: "3", team: "Unlimited" } },
  ]}
/>

Props

PropTypeDefaultDescription
titlestring—Comparison heading and accessible table caption.
descriptionstring—Optional introduction.
plansComparisonPlan[]—Columns with a stable id and name.
featuresComparisonFeature[]—Rows with a stable id, label, and values keyed by plan id.
density"comfortable" | "compact""comfortable"Spacing preset.
classNamestring—Extra section classes.

why it's built this way

Engineering Notes

Uses a native HTML table with scoped column and row headers instead of visually aligned divs, because comparison depends on preserving each value's relationship to its plan and feature for assistive technology. A min-width and horizontal overflow wrapper retain readable columns on narrow screens rather than compressing the labels into illegibility. Missing cells render a neutral dash.

how it moves, and when it doesn't

Motion Notes

The table is static and introduces no motion; comparisons benefit from stable row and column alignment rather than animated rearrangement. The mobile overflow is directly scrollable and does not rely on motion or hover to reveal values, so reduced-motion settings do not alter its behavior.