Installation
$ pnpm dlx shadcn@latest add @synccn/comparison-tableFirst time in this project? Connect synccn with one command.
Usage
import { ComparisonTable } from "@/components/ui/comparison-table";<ComparisonTable plans={plans} groups={groups} />API reference
Generated from the component's TypeScript types, so it always matches the code.
ComparisonTable
Feature comparison across plans. Values can be true/false or text. plans: [{ name, price?, featured? }]; groups: [{ title, rows: [{ feature, values: [] }] }]
PropTypeDescription
- plansrequired
ComparisonPlan[]Column headers.
- groupsrequired
ComparisonGroup[]Row groups. true/false render as icons; strings as text.
- className
stringExtra classes for the root element.
Dependencies
Read from the component's imports when the site builds. The CLI installs all of these for you.
Helpers
- lib/utilscn (merges class names)
npm packages
- clsx for cn()
- tailwind-merge for cn()
- lucide-react for Check, Minus
Accessibility
From the source
Read from this component's code when the site builds, so it can't drift.
- ARIA attributes: aria-label
More display
CardSurface with header, content and footer slots.BadgeSmall status label with an optional dot.AvatarImage with initials fallback, presence dot and stacked groups.KbdKeyboard key for shortcuts and hints.SeparatorHorizontal, vertical or labelled divider.AccordionExpanding sections with smooth height animation.