Prodular UI

Upgrade gate

Pro

Locks a feature behind a plan and says how to get it: over a dimmed preview, as a row in settings, or in place of the feature, with a plan comparison and a custom upgrade action. PlanBadge marks locked items in menus and nav.

npx prodular-ui add upgrade-gate

Part of Prodular UI Pro. Preview and read the docs freely, install with a license. See pricing

Over a preview

The feature shows dimmed and cannot be used. Compare plans opens a table with what the upgrade adds.

Cash flow forecast

Included in Scale

See the next 13 weeks of cash from open invoices, bills and payroll, updated every night.

Rows in settings

variant inline next to settings people already have. blockedReason replaces the button for people who cannot upgrade.

Payment remindersEmail customers 3 days before and after the due date.
Approval workflowsGrowthRoute bills over a limit to the right approver before they are paid.
Single sign-onScaleSign in with Okta, Google Workspace or Microsoft Entra.
Ask an owner to upgrade

In place of a page

variant replace for a whole area. The upgrade fails here to show the error.

Agents

Included in Growth

Let agents chase overdue invoices and prepare payouts, with you approving every action.

Anatomy

<UpgradeGate locked={!entitlements.forecast} feature="Cash flow forecast" plan="Scale" onUpgrade={openCheckout}>  <Forecast /></UpgradeGate>

Guidance

Use it when

  • Features people can see but their plan does not include: show what they get, then how to get it.
  • inline in settings lists and forms, overlay over a preview of a report or chart, replace for a whole section.
  • blockedReason for members who cannot change billing, so they know who can.

Avoid

  • Hiding features entirely. People cannot want what they never see.
  • Gating on every click. Gate once at the feature's entrance.

Rules for AI agents

Published in llms-full.txt, the registry and the MCP server, so coding agents follow them when they build with this component.

  • Decide locked from the workspace's entitlements on the server and pass it in; the gate does no checks of its own.
  • Name the feature and plan exactly as on the pricing page. description says what the feature does for them, in one sentence.
  • onUpgrade opens checkout or changes the plan; throw with a message to show a failure. Use PlanPicker for seat and period choices.
  • Pass comparison with the current and target plans and only the rows that differ, plus one or two they already have for context.
  • The overlay preview is inert and hidden from assistive tech; keep real data out of it if the plan should not reveal it.

API

UpgradeGate

PropTypeDefaultDescription
lockedbooleanShows the gate; false renders children.
feature / plan / descriptionstring / string / ReactNodeWhat is locked, which plan has it and why it matters.
variant"overlay" | "inline" | "replace""overlay"How the lock shows.
onUpgrade / upgradeLabel() => Promise<void> / stringUpgrade to {plan}The upgrade action.
comparisonPlanComparisonAdds Compare plans with a feature table.
blockedReasonReactNodeReplaces the button for people who cannot upgrade.

PlanBadge

PropTypeDefaultDescription
planstringA lock with the plan name for menus and nav.

Installation

The Prodular UI CLI adds the source to components/ui with everything it depends on. In a project that already uses shadcn/ui, the shadcn CLI installs it from the Prodular registry too. See Installation for the first setup.

npx prodular-ui add upgrade-gate# or, with the registry in components.jsonnpx shadcn@latest add @prodular/upgrade-gate