Staaarter

Feature Comparison Table Simple

A centered eyebrow and heading sit above a bordered comparison table listing features down the left column and check or cross icons across up to several plan columns, built as a real semantic table with scoped headers rather than a div grid.

By Staaarter Team
Feature
Docs
Live preview

Docs

Installation

A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/feature-comparison-table-simple.json

Prefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/feature/feature137.tsx instead.

Usage

The file also exports feature137Demo, 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 { Feature137, feature137Demo } from "@/components/blocks/feature/feature137";

export default function Page() {
  return <Feature137 {...feature137Demo} />;
}

Props

PropTypeDefaultDescription
eyebrowstringnoneSmall label above the heading.
headingstringnoneSection heading.
descriptionstringnoneSupporting copy under the heading.
columnsstring[]noneColumn headers, one per plan or tier being compared.
rowsFeature137Row[]noneOne row per feature, with a boolean per column.
classNamestringnoneExtra classes for the outer section element.

Types

type Feature137Row = { feature: string; values: boolean[] };

Behavior notes

  • Fully static server component, no client-side state.
  • Renders a real <table> with <th scope="col"> for plan headers and <th scope="row"> for each feature name, so the comparison is readable by assistive tech, not just visually.
  • Each check/cross icon is aria-hidden with an adjacent sr-only 'Included' / 'Not included' label rather than relying on the icon alone to convey meaning.
  • The `rows[].values` array is expected to be the same length as `columns`; index position maps a value to its column.