Settings
Settings plan
A two-card comparison of the Free and Pro subscription tiers for a BTS space, showing the active plan, pricing, and the upgrade or downgrade action.
Available
Ports as-is
Examples
Rendered live from the maintained Storybook story. Lantern stores only the story id and embeds Storybook rather than duplicating the component or its demo.
Settings plan
Rendered live from Storybook
Storybook must be running for this to load — bun run start:storybook from the monorepo root, or set NEXT_PUBLIC_STORYBOOK_URL to a deployed instance.
Props
The component's public API, read from its TypeScript source. Descriptions come from TSDoc on the prop, so this table cannot drift from the component.
| Prop | Type | Default | Description |
|---|---|---|---|
plan | SettingsPlanTier | — | Which plan the space is on. Drives the outlined card, the badge and which CTA renders. |
initialPlan | SettingsPlanTier | "free" | Uncontrolled starting plan. Ignored when `plan` is supplied. |
onPlanChange | (plan: SettingsPlanTier) => void | — | Undocumented — add TSDoc to the prop in the library. |
billingCycle | SettingsPlanBillingCycle | — | Billing cycle for the Pro card. Controlled when supplied. |
initialBillingCycle | SettingsPlanBillingCycle | "annual" | Undocumented — add TSDoc to the prop in the library. |
onBillingCycleChange | (cycle: SettingsPlanBillingCycle) => void | — | Undocumented — add TSDoc to the prop in the library. |
annualPrice | number | 199 | Pro price at annual billing, in whole dollars. |
monthlyPrice | number | 249 | Pro price at monthly billing, in whole dollars. |
freeCommission | string | "10% commission fee." | Commission taken on the Free plan, as a display string. |
confirmAction | SettingsPlanTier | null | — | Which confirmation dialog is open: `"pro"` for the upgrade sheet, `"free"` for the downgrade sheet, `null` for closed. Controlled when supplied. |
defaultConfirmAction | SettingsPlanTier | null | null | Uncontrolled starting dialog — use for open-on-mount stories. |
onConfirmActionChange | (action: SettingsPlanTier | null) => void | — | Undocumented — add TSDoc to the prop in the library. |
onConfirm | (plan: SettingsPlanTier) => void | — | Fired when a confirmation dialog is confirmed. |
learnMoreHref | string | "#" | Href for the "Learn more" processing-rates link. Defaults to an inert anchor. |
className | string | — | Undocumented — add TSDoc to the prop in the library. |
Reference
Transcribed from the component audit. If this disagrees with the source, the source is right.
- Source
src/components/settings/SettingsPlan.tsx- Portability
- Copies across unchanged — only the utils import path moves.
- Notes
- Use in space settings wherever an operator needs to view or change their plan; the active plan is marked by an outlined border rather than a fill, only one CTA renders at a time, and every plan change routes through an AlertDialog confirmation before it takes effect.