Skip to main content
Gate components are presentational. They never fetch customer data and never receive a customer ID. Load entitlement, usage, and plan state through your authenticated backend, then pass the result into the gate. Feature gates and upgrade prompt

FeatureGate

Renders children when allowed is true, fallback when it is false, and null while loading is true.

UsageGate

Renders children while usage < limit. Equality is treated as exhausted.

PlanGate

Checks whether currentPlan is included in allowedPlans.

UpgradePrompt

Displays an upgrade message and button. Without onUpgrade, the button navigates to /upgrade.

LockedOverlay

Shows an upgrade prompt over blurred, non-interactive content when locked is true. When unlocked, it returns the children without a wrapper.

Backend-driven composition

Gates improve the user interface; they are not an authorization boundary. Enforce entitlement and usage rules again on the server before performing protected work.