Skip to content

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.

PropTypeDefaultDescription
planSettingsPlanTier—Which plan the space is on. Drives the outlined card, the badge and which CTA renders.
initialPlanSettingsPlanTier"free"Uncontrolled starting plan. Ignored when `plan` is supplied.
onPlanChange(plan: SettingsPlanTier) => void—Undocumented — add TSDoc to the prop in the library.
billingCycleSettingsPlanBillingCycle—Billing cycle for the Pro card. Controlled when supplied.
initialBillingCycleSettingsPlanBillingCycle"annual"Undocumented — add TSDoc to the prop in the library.
onBillingCycleChange(cycle: SettingsPlanBillingCycle) => void—Undocumented — add TSDoc to the prop in the library.
annualPricenumber199Pro price at annual billing, in whole dollars.
monthlyPricenumber249Pro price at monthly billing, in whole dollars.
freeCommissionstring"10% commission fee."Commission taken on the Free plan, as a display string.
confirmActionSettingsPlanTier | null—Which confirmation dialog is open: `"pro"` for the upgrade sheet, `"free"` for the downgrade sheet, `null` for closed. Controlled when supplied.
defaultConfirmActionSettingsPlanTier | nullnullUncontrolled 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.
learnMoreHrefstring"#"Href for the "Learn more" processing-rates link. Defaults to an inert anchor.
classNamestring—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.