UI

Plan comparison

Side-by-side plan tier matrix with a monthly and yearly billing toggle, rolling per-seat prices, a shared selected-plan rail, and a differences-only switch that collapses shared rows.

import { PlanComparison } from '@uthereal/ui/plan-comparison'

Plan comparison playground

Room for the way you work

Billed month to month

Compare plans

8 of 8 features
What changes

Team

For smaller teams

$13per seat / month

Studio

For work across teams

$27per seat / month
Active projects
TeamUnlimited
StudioUnlimited
Shared workspaces
Team1
StudioUnlimited
Guest reviewers
Team5 per project
StudioUnlimited
Version history
Team30 days
StudioUnlimited
Approval flows
TeamNot included
StudioIncluded
Custom roles
TeamNot included
StudioIncluded
Source exports
TeamIncluded
StudioIncluded
Support
TeamEmail
StudioPriority email
Prices in USD per seat. Yearly plans are billed annually.
Loading interactive preview…

Overview

PlanComparison compares 2 to 4 pricing tiers in a single self-contained matrix. The header pairs the section heading with a monthly/yearly billing toggle and savings note; switching intervals rolls every per-seat price smoothly on an odometer without shifting column heights.

Below the header, a Differences only switch hides rows marked shared: true with a height spring while rolling the visible feature counter. Selecting a plan highlights its column and glides a shared bottom rail to the chosen header, announcing the choice in a polite live region.

Use PlanComparison when buyers need to weigh a small set of fixed plan tiers side by side. For interactive seat-count pricing with volume tiers, use Pricing calculator. For an us-versus-them matrix against competitors, use Comparison table.

Usage

'use client'
import { PlanComparison } from '@uthereal/ui/plan-comparison'

export function WorkspacePlans({
  onChoose,
}: {
  onChoose: (planId: string | null) => void
}) {
  return (
    <PlanComparison
      defaultInterval="yearly"
      selectAction="select_pricing_plan"
      onSelectPlan={onChoose}
      onIntervalChange={(interval) => {
        console.log('Billing interval:', interval)
      }}
      onAction={(action, planId) => {
        console.log(action, planId)
      }}
    />
  )
}

Omit plans and features to render the built-in Team and Studio sample comparison with local billing, filter, and selection state (nothing leaves the browser).

Examples

Three-tier yearly EUR comparison

Configure 3 or 4 plans with defaultInterval="yearly", defaultPlanId, currency="€", and a BCP 47 locale to format localized per-seat prices and pre-highlight a recommended tier.

Choose a workspace plan

Annual billing locks in up to 22% savings across every seat.

Billed yearly, save up to 22%

Compare plans

7 of 7 features
What changes

Starter

For small crews

€10per seat / month

Growth

For scaling product teams

€22per seat / month

Enterprise

For regulated orgs

€44per seat / month
Active projects
StarterUnlimited
GrowthUnlimited
EnterpriseUnlimited
Shared workspaces
Starter1
Growth10
EnterpriseUnlimited
Version history
Starter30 days
Growth1 year
EnterpriseUnlimited
Approval workflows
StarterNot included
GrowthIncluded
EnterpriseIncluded
SAML SSO & SCIM
StarterNot included
GrowthNot included
EnterpriseIncluded
EU data residency
StarterIncluded
GrowthIncluded
EnterpriseIncluded
Support SLA
StarterEmail
GrowthPriority
EnterpriseDedicated engineer
Prices in EUR per seat. Yearly plans are billed annually.
Growth selected

Differences-only default

Set defaultDifferencesOnly to start with shared capabilities collapsed, customize featuresCountLabel, and attach selectAction so plan clicks report to your host action registry.

Workspace plans

Billed month to month

Compare plans

6 differing of 8 features
What changes

Team

For smaller teams

$13per seat / month

Studio

For work across teams

$27per seat / month
Shared workspaces
Team1
StudioUnlimited
Guest reviewers
Team5 per project
StudioUnlimited
Version history
Team30 days
StudioUnlimited
Approval flows
TeamNot included
StudioIncluded
Custom roles
TeamNot included
StudioIncluded
Support
TeamEmail
StudioPriority email
Prices in USD per seat. Yearly plans are billed annually.

Matrix cells and filtering

Cell value conventions

Cell textRendering
"Included"Draws a success-colored check icon beside the word.
"Not included"Renders in muted text to recede visually.
Any other stringRenders as plain secondary text (for example "30 days", "Unlimited").

Shared vs differing rows

sharedvalues requirementBehavior under Differences only
falseExactly one entry per plan, matching plans order.Always visible.
trueOne value repeated across all plans (or identical entries).Collapses out of view when enabled.

API reference

These serializable arguments and defaults come directly from the component schema.

ArgumentType / defaultDescription
titlestringDefault: "Room for the way you work"Heading and accessible section name.
descriptionstring—Supporting line below the heading. Pass an empty string (or null in React) to hide it.
plansComparisonPlan[]Default: [{"id":"team","name":"Team","description":"For smaller teams","monthlyPrice":13,"yearlyPrice":10},{"id":"studio","name":"Studio","description":"For work across teams","monthlyPrice":27,"yearlyPrice":22}]The plan tiers compared side by side, 2 to 4 plans with unique ids, each with per-seat monthly and yearly prices.
featuresComparisonFeature[]Default: [{"id":"active-projects","label":"Active projects","shared":true,"values":["Unlimited"]},{"id":"workspaces","label":"Shared workspaces","values":["1","Unlimited"],"shared":false},{"id":"guest-reviewers","label":"Guest reviewers","values":["5 per project","Unlimited"],"shared":false},{"id":"version-history","label":"Version history","values":["30 days","Unlimited"],"shared":false},{"id":"approval-flows","label":"Approval flows","values":["Not included","Included"],"shared":false},{"id":"custom-roles","label":"Custom roles","values":["Not included","Included"],"shared":false},{"id":"source-exports","label":"Source exports","shared":true,"values":["Included"]},{"id":"support","label":"Support","values":["Email","Priority email"],"shared":false}]Feature rows compared across the plans, in order. Non-shared rows need one value per plan; shared rows carry one value repeated across every plan.
defaultIntervalmonthly | yearlyDefault: "monthly"Initially selected billing interval. Edits do not reset a mounted instance.
defaultPlanIdstring—Initially chosen plan id, matching one of the plans; omitted starts with none selected.
defaultDifferencesOnlybooleanDefault: falseInitial differences-only filter state. Edits do not reset a mounted instance.
currencystringDefault: "$"Currency symbol placed before each rolling price.
pricePeriodLabelstringDefault: "per seat / month"Unit note after each rolling price.
monthlyNotestringDefault: "Billed month to month"Savings note shown while the monthly interval is selected.
yearlyNotestringDefault: "Billed yearly, save up to 23%"Savings note shown while the yearly interval is selected.
featureColumnLabelstringDefault: "What changes"Column header over the feature names.
compareLabelstringDefault: "Compare plans"Heading of the feature filter row.
differencesLabelstringDefault: "Differences only"Label of the switch hiding rows where plans agree.
featuresCountLabelstringDefault: "{shown} of {total} features"Rolling feature counter template; {shown} fills visible rows, {total} every row.
billingLabelstringDefault: "Billing period"Accessible name of the monthly/yearly switch group.
monthlyLabelstringDefault: "Monthly"Label of the monthly billing option.
yearlyLabelstringDefault: "Yearly"Label of the yearly billing option.
selectLabelstringDefault: "Select {plan}"Select button label template; {plan} fills the plan name.
selectedLabelstringDefault: "Selected"Select button label while a plan is chosen.
footerNotestringDefault: "Prices in USD per seat. Yearly plans are billed annually."Static note in the footer.
selectedAnnouncementstringDefault: "{plan} selected"Polite status template announced when a plan is selected or cleared; {plan} fills the plan name.
selectActionstring—Registered host action requested when a plan is selected or cleared; reports the plan id.
localestring—BCP 47 locale for price digit grouping; inherited when omitted.
recipestudio | softDefault: "studio"Visual treatment. Both recipes preserve interaction behavior.
themePlanComparisonThemeDefault: {}Color mode, accent, and typed semantic token overrides.
motionnone | subtle | expressiveDefault: "subtle"Animation preset. System reduced-motion preferences take precedence.
motionOptionsPlanComparisonMotionOptionsDefault: {}Price roll, selected highlight, and row reflow timing overrides in milliseconds.
dirltr | rtl—Reading direction; inherited from the page when omitted.
  • ComparisonPlan accepts { id, name, description?, monthlyPrice, yearlyPrice }. Plan IDs must be unique, and yearlyPrice cannot exceed monthlyPrice.
  • ComparisonFeature accepts { id, label, shared?, values }. Feature IDs must be unique, and every non-shared row must provide one string per plan.

React integration

PropPurpose
onSelectPlan(planId)Called with the chosen plan ID, or null when the user clears their current selection.
onIntervalChange(interval)Called with 'monthly' or 'yearly' whenever the billing toggle changes.
onAction(action, itemId?)Called with selectAction and the clicked plan ID on every plan toggle.
presetApplication defaults overridden by explicit instance arguments.
tokensCSS variables applied after the typed theme, forwarded to the root and composed child controls.
ref, className, styleApplied to the root <section> element.
Native attributesid, aria-*, data-*, and remaining <section> props forwarded to the root element.

Keyboard & accessibility

KeyAction
TabMoves across the billing toggle, differences switch, and each plan select button.
ArrowLeft / ArrowRightSwitches between Monthly and Yearly inside the billing toggle (RTL-aware).
Enter / SpaceToggles Differences only or selects and clears a plan tier.
  • The matrix uses semantic role="table", role="row", role="columnheader", role="rowheader", and role="cell" roles with aria-labelledby tied to the section heading.
  • Each rolling price region carries aria-live="polite" and aria-atomic="true" with visually hidden plain text so screen readers announce the complete amount once rather than digit by digit.
  • Each select button exposes aria-pressed for the active plan, and a pre-mounted role="status" live region announces selectedAnnouncement when a plan is chosen or cleared.
  • Container queries tighten padding below 720px and stack feature names above their aligned plan values below 640px, revealing per-cell plan labels automatically. Logical CSS properties mirror cleanly in RTL (dir="rtl"), and @media (forced-colors: active) maps borders, rails, and check icons to system colors.

Motion & theming

Prices and the feature counter roll on an odometer, the selected-plan bottom rail glides between columns on a shared layoutId morph spring, and filtered rows expand and collapse height on the smooth spring (0.4s, zero overshoot).

Under prefers-reduced-motion: reduce, rolling digits jump immediately, rail glides disable, and row transitions fall back to 120ms opacity crossfades. Setting motion="none" makes every transition immediate (0ms).

theme accepts mode, accent, and typed tokens across these groups:

Token groupCSS custom properties
core--ui-surface, --ui-surface-raised, --ui-text, --ui-text-secondary, --ui-muted, --ui-border, --ui-highlight, --ui-accent, --ui-accent-foreground, --ui-danger, --ui-focus-ring, --ui-radius, --ui-border-width, --ui-shadow, --ui-disabled-opacity, --ui-font, --ui-font-size, --ui-font-weight
extended--ui-surface-sunken, --ui-border-strong, --ui-border-subtle, --ui-track, --ui-info, --ui-success, --ui-warning, --ui-tone-foreground, --ui-overlay, --ui-tint-strength
shape--ui-radius-sm, --ui-popup-radius, --ui-surface-radius
control--ui-control-height, --ui-control-padding-x, --ui-control-gap, --ui-icon-size

An application-wide UtherealProvider supplies defaults.

Composition

In an agent composition, PlanComparison is a leaf block. Provide 2 to 4 plans with unique IDs, align every non-shared feature row's values array with plans, and wire selectAction to a registered host action. See Building with agents.

{
  "type": "PlanComparison",
  "props": {
    "title": "Workspace plans",
    "defaultInterval": "yearly",
    "defaultPlanId": "studio",
    "selectAction": "select_pricing_plan"
  },
  "children": []
}

On this page