# Compare Page

> A React comparison page template (Acme vs a competitor): a verdict hero, a feature table, price comparison, migration steps and FAQ.

- Type: React template (Templates)
- Access: Pro (the source needs a Wingo UI Pro plan, see https://wingo-ui.com/pricing)
- Version: 1.1.0
- Install: `npx wingo-ui@latest add compare-page`
- Docs: https://wingo-ui.com/templates/compare-page

## Interaction

Pick Taskly, Boardify or Planhub in the segmented control above the versus card (arrow keys move between them) and the whole page follows: the title and one-line verdict, the three quick facts, the six reasons teams switch, every table row, the price comparison, the import steps, the switcher quotes and the FAQ. The feature table groups rows under Planning, Docs, Automations, Security and Pricing with a check, a cross, a partial mark or a short value; the info button beside a value shows its note in a tooltip (hover or keyboard focus). Its header row with both wordmarks sticks under the page header while you scroll, and the Only show differences switch hides the rows where both products match. Drag the team size slider (or use the arrow keys) from 2 to 100 people, with 10, 25 and 50 marked: both yearly costs roll to their new totals with the per-seat breakdown and add-ons, and the band below says how much Acme saves, or honestly says when the other tool costs less. On phones the table becomes one card per feature with both values side by side and notes written out under them, the steps and price cards stack, and nothing scrolls sideways.

## Installation

```bash
npx wingo-ui@latest add compare-page
```

Pro item: run `npx wingo-ui@latest login` once with a Pro account. The CLI adds the files, their dependencies and a version record for updates.

With shadcn: `npx shadcn@latest add @wingo-ui/compare-page` (needs the @wingo-ui registry with your API key in components.json)

Files:

- `components/templates/compare-page.tsx`
- `components/templates/compare-page-data.ts`

npm dependencies: `npm i motion lucide-react`

Wingo UI dependencies (installed automatically):

- [CTA Section](https://wingo-ui.com/components/cta-section) ([Markdown](https://wingo-ui.com/components/cta-section.md))
- [FAQ Section](https://wingo-ui.com/components/faq-section) ([Markdown](https://wingo-ui.com/components/faq-section.md))
- [Feature Grid](https://wingo-ui.com/components/feature-grid) ([Markdown](https://wingo-ui.com/components/feature-grid.md))
- [Hero Section](https://wingo-ui.com/components/hero-section) ([Markdown](https://wingo-ui.com/components/hero-section.md))
- [Marketing Footer](https://wingo-ui.com/components/marketing-footer) ([Markdown](https://wingo-ui.com/components/marketing-footer.md))
- [Marketing Header](https://wingo-ui.com/components/marketing-header) ([Markdown](https://wingo-ui.com/components/marketing-header.md))
- [Marketing Section](https://wingo-ui.com/components/marketing-section) ([Markdown](https://wingo-ui.com/components/marketing-section.md))
- [Testimonials Section](https://wingo-ui.com/components/testimonials-section) ([Markdown](https://wingo-ui.com/components/testimonials-section.md))
- [Animated Counter](https://wingo-ui.com/components/animated-counter) ([Markdown](https://wingo-ui.com/components/animated-counter.md))
- [Button](https://wingo-ui.com/components/button) ([Markdown](https://wingo-ui.com/components/button.md))
- [Segmented Control](https://wingo-ui.com/components/segmented-control) ([Markdown](https://wingo-ui.com/components/segmented-control.md))
- [Slider](https://wingo-ui.com/components/slider) ([Markdown](https://wingo-ui.com/components/slider.md))
- [Switch](https://wingo-ui.com/components/switch) ([Markdown](https://wingo-ui.com/components/switch.md))
- [Tooltip](https://wingo-ui.com/components/tooltip) ([Markdown](https://wingo-ui.com/components/tooltip.md))
- [useControllableState](https://wingo-ui.com/components/use-controllable-state) ([Markdown](https://wingo-ui.com/components/use-controllable-state.md))
- [Motion presets](https://wingo-ui.com/components/motion) ([Markdown](https://wingo-ui.com/components/motion.md))
- [Navigation](https://wingo-ui.com/components/navigation) ([Markdown](https://wingo-ui.com/components/navigation.md))
- [Tones](https://wingo-ui.com/components/tones) ([Markdown](https://wingo-ui.com/components/tones.md))
- [UIProvider](https://wingo-ui.com/components/ui-config) ([Markdown](https://wingo-ui.com/components/ui-config.md))

## Usage

```tsx
// app/(marketing)/compare/[competitor]/page.tsx
"use client"

import Link from "next/link"
import { useParams, useRouter } from "next/navigation"
import { ComparePage } from "@/components/templates/compare-page"
import { COMPETITORS } from "@/components/templates/compare-page-data"

export default function CompareRoute() {
  const { competitor } = useParams<{ competitor: string }>()
  const router = useRouter()
  return (
    <ComparePage
      linkComponent={Link}
      competitors={COMPETITORS}
      competitor={competitor}
      onCompetitorChange={(id) => router.replace(`/compare/${id}`, { scroll: false })}
    />
  )
}
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `competitors?` | `Competitor[]` | `"COMPETITORS"` | Every competitor the switcher offers: { id, name, icon, tagline, verdict, facts, reasons, groups, pricing, steps, quotes, faq }. |
| `defaultCompetitor?` | `string` | `"taskly"` | The competitor the page opens on while uncontrolled. |
| `competitor?` | `string` |  | Controlled competitor id; pair it with onCompetitorChange (e.g. to route to /compare/<id>). |
| `onCompetitorChange?` | `(id: string) => void` |  | Called when the switcher changes. |
| `design?` | `"classic" \| "bold"` | `"classic"` | The whole page's look. classic follows the layout props; bold: a pill header, a magazine size title on an aurora with tinted bands, the versus card under it, illustrated reason cards, the table on a raised panel, an inverted Acme price card, big step numbers, a featured quote, FAQ cards, a closing band over a drawn scene and a wordmark footer. headerProps and footerProps still win. |
| `background?` | `"plain" \| "soft" \| "glow" \| "aurora" \| "grid" \| "dots"` | `"grid"` | The main background: plain is the bare page color; the others tint the page and add a glow, an aurora, a grid or dots over the first screen. A design picks its own unless you set one. Classic uses grid, bold aurora; over plain the hero draws its own grid or mesh. |
| `backgroundColor?` | `string` | `"oklch(0.62 0.14 275)"` | The tint and glow color of the main background. |
| `bandBackground?` | `"muted" \| "tinted" \| "gradient" \| "dots"` | `"muted"` | The secondary background of the alternating bands. Cards, fields and tiles inside a band are lifted one step above it, so they never share its color. |
| `bandColor?` | `string` | `"oklch(0.62 0.14 275)"` | The tint of tinted and gradient bands; defaults to backgroundColor. |
| `showSwitcher?` | `boolean` | `true` | The segmented control above the versus card; off for a page about one competitor. |
| `heroLayout?` | `"split" \| "centered"` | `"split"` | split: copy left, versus card right; centered: copy over the card. Applies to the classic design. |
| `acmePricing?` | `ComparePricing` | `"ACME_PRICING"` | Acme's side of the price comparison: { plan, perSeat, minSeats?, platformFee?, addOns? }. |
| `teamSizes?` | `number[]` | `"[10, 25, 50]"` | The labeled marks on the team size slider, which runs from 2 to 100 people. |
| `defaultTeamSize?` | `number` | `25` | The team size the price comparison opens on (2 to 100). |
| `defaultOnlyDifferences?` | `boolean` | `false` | The table opens with matching rows hidden. |
| `highlight?` | `boolean` | `true` | Tints the Acme column of the table. |
| `stickyTableHeader?` | `boolean` | `true` | The table's header row sticks under the page header from 768px. |
| `showReasons?` | `boolean` | `true` | The "Why teams switch" feature grid. |
| `showTable?` | `boolean` | `true` | The feature by feature table. |
| `showPricing?` | `boolean` | `true` | The yearly price comparison with the team size slider. |
| `showMigration?` | `boolean` | `true` | The three import steps. |
| `showTestimonials?` | `boolean` | `true` | Quotes from teams that switched. |
| `showFaq?` | `boolean` | `true` | The switching FAQ. |
| `showCta?` | `boolean` | `true` | The closing call to action. |
| `ctaVariant?` | `"inverted" \| "soft" \| "split" \| "plain"` | `"inverted"` | The look of the closing call to action. Applies to the classic design. |
| `header?` | `boolean` | `true` | The sticky marketing header; turn it off when the page sits in a site layout. |
| `footer?` | `boolean` | `true` | The marketing footer. |
| `headerProps?` | `Partial<MarketingHeaderProps>` |  | Passed to MarketingHeader (announcement, ctaTone, items...). |
| `footerProps?` | `Partial<MarketingFooterProps>` |  | Passed to MarketingFooter. |
| `tone?` | `"neutral" \| "brand" \| "success" \| "warning" \| "danger" \| "info"` | `"neutral"` | The switcher thumb, slider, switch, step numbers, icon tiles and FAQ accents. |
| `ctaTone?` | `"neutral" \| "brand" \| "success" \| "warning" \| "danger" \| "info"` | `"neutral"` | The primary buttons of the hero, the import steps and the closing band. |
| `animateIn?` | `boolean` | `true` | The hero rises in once on mount; off in thumbnails and under reduced motion. |
| `locale?` | `string` | `"en-US"` | Intl locale for the prices (always USD). |
| `getImportHref?` | `(competitor: Competitor) => string` |  | The importer link; default /sign-up?import=<id>. |
| `linkComponent?` | `(props: LinkComponentProps) => ReactNode` | `"<a>"` | The router link for every link (next/link in an app); default the LinkProvider's. |
| `labels?` | `Partial<ComparePageLabels>` | `"DEFAULT_COMPARE_PAGE_LABELS"` | Every visible string; titles that name the competitor are functions of its name. |
| `className?` | `string` |  | Classes for the root. |
| `classNames?` | `Partial<Record<ComparePageSlot, string>>` |  | Classes for switcher, hero, versus, reasons, table, pricing, migration, testimonials, faq and cta. |

## Parts

### CompareTable (component)

The grouped feature table: a real table with a sticky header row from 768px, a card per row on phones. Takes div props.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `competitor?` | `Competitor` |  | The competitor; its groups fill the rows. |
| `groups?` | `CompareGroup[]` |  | Replaces competitor.groups. |
| `onlyDifferences?` | `boolean` | `false` | Hides rows where both values match. |
| `highlight?` | `boolean` | `true` | Tints the Acme column. |
| `stickyOffset?` | `number \| false` | `64` | The header row sticks this many px from the top; false keeps it in place. |
| `brand?` | `ReactNode` |  | Replaces the Acme logo in the header row. |
| `labels?` | `Partial<ComparePageLabels>` |  | The table strings. |

### CompareCellView (component)

One value: a check, a cross, a partial mark or text, with its note as a tooltip or inline text. Takes span props.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `cell?` | `CompareCell` |  | true, false, "partial", a string, or { value, note }. |
| `product?` | `string` |  | Whose value it is, for the note's label. |
| `noteMode?` | `"tooltip" \| "inline"` | `"tooltip"` | The note behind an info button or written under the value. |
| `labels?` | `Pick<ComparePageLabels, "included" \| "notIncluded" \| "partial" \| "note">` |  | Screen reader and partial labels. |

### CompareWordmark (component)

A fictional competitor drawn as its lucide glyph and name (never a real logo). Takes span props.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `competitor?` | `Pick<Competitor, "name" \| "icon">` |  | The competitor. |
| `size?` | `"sm" \| "md" \| "lg"` | `"md"` | Glyph tile and text size. |

### compareYearlyCost (function)

compareYearlyCost(pricing, seats): (perSeat + add-ons) x max(seats, minSeats) x 12 + platformFee x 12, in dollars.

### COMPETITORS (constant)

Taskly, Boardify and Planhub with their verdicts, reasons, 21 table rows, pricing, steps, quotes and FAQ.

### ACME_PRICING (constant)

Acme Pro at $12 per user per month.

### DEFAULT_COMPARE_PAGE_LABELS (constant)

The English strings.

### Competitor (type)

{ id, name, icon, tagline, verdict, facts, reasons, groups, pricing, steps, quotes, faq }.

### CompareGroup (type)

{ id, label, rows: CompareRow[] }.

### CompareRow (type)

{ id, label, acme: CompareCell, competitor: CompareCell }.

### CompareCell (type)

true | false | "partial" | string, or { value, note }.

### ComparePricing (type)

{ plan, perSeat, minSeats?, platformFee?, addOns? }.

### COMPARE_PAGE_DESIGNS (constant)

The design names, classic first: ["classic", "bold"].

### ComparePageProps (type)

Props of ComparePage.

### ComparePageDesign (type)

The values of the design prop: "classic" | "bold".

## Examples

- **Bold design**: design="bold": a pill header, huge type on an aurora with tinted bands, illustrated reasons, an inverted Acme price, big step numbers and a wordmark footer.
- **Boardify, brand tone**: Opens on Boardify with the marketing orange on the switcher, slider and every primary button.
- **Centered hero, differences only**: The copy over the versus card, and the table opens with matching rows hidden.
- **One competitor, short page**: No switcher, no testimonials or migration steps: a focused Acme vs Taskly page with a soft closing band.
- **Inside a site layout**: No header or footer, the table header stays in place and the Acme column is not tinted.

## See also

- [Feature Grid](https://wingo-ui.com/components/feature-grid) ([Markdown](https://wingo-ui.com/components/feature-grid.md))
- [Testimonials Section](https://wingo-ui.com/components/testimonials-section) ([Markdown](https://wingo-ui.com/components/testimonials-section.md))
- [FAQ Section](https://wingo-ui.com/components/faq-section) ([Markdown](https://wingo-ui.com/components/faq-section.md))
- [Slider](https://wingo-ui.com/components/slider) ([Markdown](https://wingo-ui.com/components/slider.md))
- [Pricing Page](https://wingo-ui.com/components/pricing-page) ([Markdown](https://wingo-ui.com/components/pricing-page.md))

---

Canonical: https://wingo-ui.com/templates/compare-page
More components: https://wingo-ui.com/components · Index for agents: https://wingo-ui.com/llms.txt
