PricingTable
Conversion pricing cards: display-string prices, a SegmentedControl billing toggle that appears automatically, a highlighted recommended tier and feature lists with included/excluded states.
Design intent
PricingTable renders conversion-focused tier cards: display-string prices (the consumer owns currency formatting), an automatic monthly/annual SegmentedControl toggle when tiers carry both prices, a highlighted tier with primary ring and badge, and CTA buttons that route through linkComponent. Cards stack to one column at 320px.
npx @slipstream-ui/cli@latest add pricing-tableProps
| Prop | Type | Default | Description |
|---|---|---|---|
| tiers | PricingTier[] | — | name, description, monthlyPrice, annualPrice, priceSuffix, features, highlight, ctaHref, ctaLabel. |
| billing | 'auto' | 'monthly' | 'annual' | 'auto' | auto shows the toggle when any tier has both prices. |
| billingLabel | string | 'Billing period' | Accessible name for the billing toggle. |
| linkComponent | ElementType | — | Router link element for tier CTAs. |
| linkHrefProp | 'href' | 'to' | 'href' | Prop carrying the destination on linkComponent. |
| className | string | — | Additional CSS classes to apply. |
Anti-patterns
validate_usage is the MCP tool that rejects these mistakes: the same list agents see over MCP and in the canonical markdown.
Don't format currency inside the component
Prices are display strings — the consumer owns locale, currency and i18n. Pass pre-formatted values like '$29' or '29 €'.
tsx// AvoidmonthlyPrice: 29// PrefermonthlyPrice: formatPrice(29, 'USD')Don't highlight every tier
The highlight ring and badge are a visual emphasis for ONE recommended tier. Multiple highlights cancel each other out.
tsx// Avoid: highlight on all three tiers// Prefer: highlight only the recommended plan
Accessibility
- The billing toggle is a SegmentedControl radiogroup — arrow keys move between Monthly and Annual.
- Cards stack to a single column at 320px; keep priceSuffix short.
- Excluded features render muted with a distinct marker — use { label, included: false } rather than omitting them.
Content guidelines
Tier names and CTAs
- Name tiers by audience or capability, not price
- CTA labels describe the action ('Start free', 'Go Pro')
- Feature lists should be scannable — 3 to 6 items per tier
Good examples
- name: 'Pro', ctaLabel: 'Go Pro'
- features: ['Unlimited projects', 'Priority support', 'SSO']
Bad examples
- name: '$29 plan'
- ctaLabel: 'Click here'
Composition
Compose with SegmentedControl: The billing toggle is a SegmentedControl in controlled mode
options=[{value:'monthly',label:'Monthly'},{value:'annual',label:'Annual'}]
Compose with Badge: The highlight badge renders through Badge with the default variant
highlightLabel defaults to 'Most popular'
Compose with Button: Tier CTAs render through Button asChild so they are real links
ctaHref + ctaLabel produce <Button asChild><a href>…</a></Button>
Related components: ComparisonTable, Badge, Button, SegmentedControl
Dependencies
What the registry installs alongside this component. Package imports already include these.
npm packages
- class-variance-authority
- clsx
- tailwind-merge
Browser support
| Browser | Tested versions |
|---|---|
| Chrome | 111+ (Mar 2023) |
| Edge | 111+ (Mar 2023) |
| Firefox | 121+ (Dec 2023) |
| Safari | 17.2+: macOS & iOS (Dec 2023) |
Slipstream components rely only on CSS custom properties, Flexbox/Grid, and ARIA, the everyday baseline of the last two years of evergreen releases. Anything newer is progressive enhancement: unsupported browsers keep full functionality with static behavior instead of animations.