Skip to content

Interactive Playground

Every scenario below is a live, editable SDK demo running entirely in local_only mode — a bundled playbook.json with plans, entitlements, placements, and targeting, no network calls. This page is the index; follow a link to open a scenario and edit its code alongside a live preview.

Always-visible inline placements.

ScenarioSlotWhat it shows
F-1: Upgrade ButtonbuttonAn always-visible upgrade CTA in a nav slot
F-2: Plans & Pricing Cardin_pageAn inline pricing/plans card
F-3: Quota Meterin_pageA usage meter with progress bar and counter
F-4: Annual Nudge BannerbannerAn annual-plan nudge banner

Entitlement gates that render an upsell when access is denied.

ScenarioSlotWhat it shows
G-1: Data Export GatemodalA blocking modal gate on a paid feature
G-2: Branding Gatein_pageAn inline gate on a branding feature
G-3: Brand Kit Gatein_pageA card gate on a brand-kit feature

Ephemeral, moment-driven messages.

ScenarioSlotWhat it shows
M-1: Usage Warning BannerbannerA “running low” usage banner
M-2: Usage Exhausted ModalmodalA limit-reached modal
M-3: Trial Welcome ToasttoastA trial-welcome toast

The imperative SDK, no slot components.

ScenarioWhat it shows
H-1: PlacementControllerDriving a placement imperatively
H-2: EntitlementGateAn entitlement check without React
H-3: SdkSession One-ShotA one-shot session evaluation

Each scenario runs the SDK in an isolated Sandpack environment:

  1. playbook.json provides plans, entitlements, placements, surface templates, and targeting rules.
  2. RevTurbineProvider initializes the SDK in local_only mode — no network calls.
  3. Demo users (Alice, Bob, Carol, Dan, Eve, Frank) have different plans, usage, and entitlements.
  4. Targeting rules evaluate against the user context to decide which placements to show.

Switch demo users in a scenario’s code to see how the SDK renders different placements for different segments.