Examples

Complete, standalone example projects, each teaching exactly one idea, from a minimal paywall to trials, funnels, and Rive animations.

Every example is a complete, standalone framework project teaching exactly one idea. Styling is deliberately plain so the mechanism is the thing you read. When what you're building matches one, read it before writing code. Each README.md explains the idea, and every example runs as-is.

Use an example

superwall create --example multi-page   # scaffold it as a new project
superwall dev                            # open it in the studio

All examples are public at github.com/superwall/superwall/tree/main/examples, browse them there, or copy a directory anywhere for a working superwall dev.

Fundamentals

ExampleThe one ideaReach for it when
minimalOne page, one product, purchase. A paywall is a React component, not a templateStarting anything
product-selectionSelection state is ordinary React. The framework has no "selected plan" conceptMultiple plans, price rows

minimal shows the canonical price guard (render the price only when it exists, with bare copy as the fallback). product-selection adds a typed plan union, haptics.selection() on choice vs haptics.light() on the CTA, a real radiogroup with aria-checked, store-formatted price and monthlyPrice side by side, and a designed unpriced state.

ExampleThe one idea
multi-pagerouter.push/back, the page stack, and chrome in layout.tsx that reads router state
transitionsAll five built-ins plus a custom zoom, proof a transition is just CSS on two attributes
onboarding-quizAnswers decide where you land; the router carries no state (a plain module outside React does)

onboarding-quiz's terminal page defends every read, a replayed page never crashes on a missing answer, and hardcodes step labels per page, because a branching flow's depth is not its step number.

Purchases

ExampleThe one idea
purchase-statesThe two channels: what your purchase() call resolves vs what the SDK reports on its own
trial-eligibilityTwo paywalls in one, chosen by the store, every string forks and both states read as intentional
abandonment-offerpurchase() resolving abandoned is a signal only this paywall can act on, a last-chance offer on a custom sheet transition
trial-remindersA local notification declared in config, scheduled by the SDK when the trial starts
web-funnelSelling on the web: steps as pages on the shift transition, answers kept in the URL with useQueryState, then checkout: "sheet", purchase() unchanged

purchase-states is the only example showing the full haptic vocabulary (success() / error() keyed to outcomes). abandonment-offer holds the deepest CSS lesson of the set: the scrim behind its sheet reuses the framework's timing variables, so one number drives both the page dim and the backdrop, see Transitions.

The host

ExampleThe one idea
personalizationuseVariables(), device, user, placement params, and guarding every read
permissionsrequestPermission (asks the OS) vs requestCallback (asks your app); a denial is an outcome, not an error

Look and feel

ExampleThe one idea
custom-fontsA typeface from a file in your project, relative-path @font-face, subset to latin
with-tailwindTailwind v4 with zero framework config, and the dark: variant redefined onto the SDK's class
with-motionIn-page animation gated on presentation, plus a price count-up gated on the value existing
with-riveInteractive vector animation, .riv as a hosted asset, the WASM engine bundled
orientationuseDevice().orientation, landscape is a two-column reflow, not a shrunken portrait

Localization

ExampleThe one idea
localizationFour locales by filename, shared + paywall-local catalogs, guarded {price} interpolation, no language picker on device

How is this guide?

On this page