Patterns · Marketing
PricingTable
Since v3.1.0
Plans side by side with a monthly / yearly switch, built on PlanCard and SegmentedControl. Client component.
import { PricingTable } from '@nexub/marketing';Examples
Default
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| plansrequired | PricingPlan[] | — | Each plan: name, price: { monthly, yearly } per month, features, cta, and href or onSelect; highlighted and badge optional. |
| currencyrequired | string | — | ISO 4217 code. |
| locale | string | — | BCP 47 locale for the prices. |
| defaultPeriod | 'monthly' | 'yearly' | 'monthly' | Billing period shown first. |
| periodLabels | Record<BillingPeriod, string> | { monthly: 'Monthly', yearly: 'Yearly' } | Labels of the switch. |
| perMonthLabel | string | '/month' | Shown after each price. |
| header | React.ReactNode | — | A SectionHeader, usually. |
| billingLabel | string | 'Billing period' | Accessible name of the billing switch. |
On iOS & Android
Web only
PricingTable has no @nexub/react-native twin. On phones, follow the platform pattern instead, or compose it from the native components listed on the React Native page.