Skip to main content
Clever Ops

Program Compare Table

Training programs compared like a coach would, bold uppercase columns over ruled attribute rows, sessions per week in mono data, one badge pick. A React and Tailwind block.

Preview & code

Loading Program Compare Table preview

Installation

pnpm dlx shadcn@latest add @cleverui/program-compare-table

Requires the @cleverui registry in your components.json, a one-off, two-line setup.

Usage

tsx
import { ProgramCompareTable } from '@/components/blocks/program-compare-table'
Exampletsx
'use client'

import { ProgramCompareTable } from '@/components/blocks/program-compare-table'

export default function ProgramCompareTableDemo() {
  return (
    <ProgramCompareTable
      eyebrow="Straight answers"
      heading="Which lane are you in?"
      note="Not sure? Book a chat and a coach will pick for you."
      onSelect={() => {}}
      programs={[
        {
          name: 'Strength',
          tagline: 'For your first year under the bar',
          ctaLabel: 'Start strength',
        },
        {
          name: 'Engine',
          tagline: 'Conditioning that still builds muscle',
          badge: 'Most taken',
          ctaLabel: 'Join engine',
        },
        {
          name: 'Hybrid',
          tagline: 'Barbell work plus race-day engine',
          ctaLabel: 'Go hybrid',
        },
      ]}
      rows={[
        { label: 'Sessions / wk', values: ['4', '5', '4'] },
        { label: 'Session length', values: ['60 MIN', '45 MIN', '55 MIN'] },
        { label: 'Coaching ratio', values: ['1:8', '1:12', '1:10'] },
        {
          label: 'Best for',
          values: ['New lifters', 'Race prep', 'All-round'],
        },
        {
          label: '1:1 check-ins',
          values: ['Monthly', '', 'Bi-weekly'],
        },
      ]}
    />
  )
}

API reference

ProgramCompareTable accepts the following props.

PropTypeDefaultDescription
headingstring'Which lane are you in?'
eyebrowstringcoach-voice kicker, e.g. STRAIGHT ANSWERS
programs*ProgramCompareProgram[]2–3 columns; names render uppercase
rows*ProgramCompareRow[]attribute rows aligned to the programs order
regionLabelstring'Program comparison'aria-label for the focusable scroll region
notestringplain-spoken footnote
onSelect(program: { name: string }) => voidfires on CTA press when the program has no href

…plus everything from Omit<React.HTMLAttributes<HTMLElement>, 'onSelect'>: className, event handlers, aria attributes and the rest pass straight through.

Referenced types

Typestsx
export interface ProgramCompareProgram {
  name: string
  tagline?: string
  /** marks at most one program, e.g. MOST TAKEN */
  badge?: string
  ctaLabel?: string
  href?: string
}

export interface ProgramCompareRow {
  label: string
  /** values aligned to programs order; empty string renders a muted em dash */
  values: string[]
}

Frequently asked questions

How do I install the Program Compare Table component?

Register the @cleverui registry in your components.json ("@cleverui": "https://cleverops.com.au/r/{name}.json"), then run `npx shadcn@latest add @cleverui/program-compare-table`. The shadcn CLI copies the source into your project, you own the code from that point. You can also copy the source directly from this page.

What dependencies does Program Compare Table require?

Program Compare Table uses motion on top of React and Tailwind CSS. You don't need to install it manually, the shadcn CLI resolves and installs npm dependencies automatically when you add the component.

Can I theme Program Compare Table to match my brand?

Yes. The component is styled entirely with Tailwind utilities over standard design tokens (primary, background, muted, border), so it inherits your existing shadcn/ui theme automatically. Change your CSS variables and the component follows, no source edits needed for palette, radius, or fonts.

Want this built for you?

CleverUI is built by the Clever Ops web team. If you'd rather ship a hand-coded, fast, custom website than assemble one, we build them for Australian businesses every week.

Explore web development services