Staaarter

Feature Table CTA

A real HTML comparison table listing plan names as columns and features as rows, each cell showing a checkmark or cross for whether that plan includes the feature, with a single call-to-action button underneath for a quick plan or feature comparison.

By Staaarter Team
CTA
Docs
Live preview

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/feature-comparison-table-cta.json

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

Usage

The file also exports cta37Demo, 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 { Cta37, cta37Demo } from "@/components/blocks/cta/cta37";

export default function Page() {
  return <Cta37 {...cta37Demo} />;
}

Props

PropTypeDefaultDescription
headingReactNodenoneHeading above the table.
descriptionstringnoneSupporting copy under the heading.
plansstring[]nonePlan names, rendered as table column headers.
featuresFeatureRow[]noneFeature rows; `included` has one boolean per plan, same order as `plans`.
primaryCtaCtaLinknonePrimary action button, label and destination.
classNamestringnoneExtra classes for the outer section element.

Types

interface FeatureRow {
  name: string;
  included: boolean[]; // one entry per plan column, same order as `plans`
}

interface CtaLink {
  label: string;
  href: string;
}

Behavior notes

  • A real semantic `<table>` with column headers (`scope="col"`) for each plan and row headers (`scope="row"`) for each feature name, so screen readers can announce which plan a given cell belongs to.
  • Each check/cross icon is paired with visually-hidden "Included"/"Not included" text since the icon alone is decorative.
  • Fully static: no sorting, filtering, or plan-selection state.