crucıble

Tollgate

In-app upgrade / paywall block: TollgateLock dims any feature behind a frosted veil with a Pro chip that lifts on hover, and its Upgrade button morphs into a focus-trapped upgrade dialog — usage meter at its limit, monthly/annual toggle with savings badge, plan radio cards with Tally-rolled prices, a ticking unlock list and async onUpgrade that bursts Sparks into “You're on Pro” and lifts every lock under the provider. Presentation only — gate for real server-side.

motionpro

Installation

CLI

npx shadcn@latest add @crucible/tollgate

Manual — install dependencies, then copy the source

npm install motion

Props

PropTypeDefaultDescription
unlockedbooleanControlled unlocked state. Omit to let a successful upgrade unlock automatically.
defaultUnlockedbooleanfalseInitial unlocked state when uncontrolled.
onUnlockedChange(unlocked: boolean) => voidFires when a successful upgrade (or reset()) changes the unlocked state.
onUpgradeTollgateUpgradeHandlerCalled with the chosen plan and cycle. Resolve to finish the upgrade — every lock under this provider lifts its veil; reject to show the rejection message (or a generic one) inline in the dialog.
childrenReact.ReactNode

Honors prefers-reduced-motion with a designed static fallback, and passes className through.