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.
Fixed Slots
Section titled “Fixed Slots”Always-visible inline placements.
| Scenario | Slot | What it shows |
|---|---|---|
| F-1: Upgrade Button | button | An always-visible upgrade CTA in a nav slot |
| F-2: Plans & Pricing Card | in_page | An inline pricing/plans card |
| F-3: Quota Meter | in_page | A usage meter with progress bar and counter |
| F-4: Annual Nudge Banner | banner | An annual-plan nudge banner |
Access Gates
Section titled “Access Gates”Entitlement gates that render an upsell when access is denied.
| Scenario | Slot | What it shows |
|---|---|---|
| G-1: Data Export Gate | modal | A blocking modal gate on a paid feature |
| G-2: Branding Gate | in_page | An inline gate on a branding feature |
| G-3: Brand Kit Gate | in_page | A card gate on a brand-kit feature |
Global Slots
Section titled “Global Slots”Ephemeral, moment-driven messages.
| Scenario | Slot | What it shows |
|---|---|---|
| M-1: Usage Warning Banner | banner | A “running low” usage banner |
| M-2: Usage Exhausted Modal | modal | A limit-reached modal |
| M-3: Trial Welcome Toast | toast | A trial-welcome toast |
Headless API
Section titled “Headless API”The imperative SDK, no slot components.
| Scenario | What it shows |
|---|---|
| H-1: PlacementController | Driving a placement imperatively |
| H-2: EntitlementGate | An entitlement check without React |
| H-3: SdkSession One-Shot | A one-shot session evaluation |
How it works
Section titled “How it works”Each scenario runs the SDK in an isolated Sandpack environment:
playbook.jsonprovides plans, entitlements, placements, surface templates, and targeting rules.RevTurbineProviderinitializes the SDK inlocal_onlymode — no network calls.- Demo users (Alice, Bob, Carol, Dan, Eve, Frank) have different plans, usage, and entitlements.
- 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.