| Value | Purpose |
|---|---|
organizationId | Your Fanfare organization ID from the dashboard. |
publishableKey | A browser-safe publishable key for your integration. |
experienceId | The experience your page should render. |
React Provider
Most React apps configure Fanfare once near the route or app area that renders the experience.FanfareProvider initializes the core SDK, restores local session state by default, and provides SDK access to components and hooks below it.
Common provider props:
| Prop | Use for |
|---|---|
organizationId | Required organization ID. |
publishableKey | Required browser-safe key. |
autoRestore | Restore local session on mount. Defaults to true. |
autoResume | Resume known journeys after restore. Defaults to true. |
loadingComponent | UI shown while the provider initializes. |
locale | Locale for built-in component text. |
translations | Partial copy overrides. |
debug | Development troubleshooting only. |
ExperienceWidget
Configure the journey UI withExperienceWidget.
| Prop | Use for |
|---|---|
experienceId | Required experience ID. |
autoStart | Start the journey when the widget is ready. |
checkoutUrl | Default destination after a grant. |
onGranted | Custom server handoff or app routing after a grant. |
slots | Override specific journey states. |
theme | Per-widget theme values. |
variant | Supported widget visual variant. |
accessCode | Provide an access code when your page already has one. |
autoEnterWaitlist | Enter waitlist automatically when that public action is available. |
onGranted when checkout needs a trusted handoff:
Copy And Theme
Use provider-levellocale and translations for shared copy. Use widget theme, variant, and slots for per-page customization.
Core SDK
Use the core SDK when your application owns every screen.sdk.destroy() when the application area that owns the SDK permanently unmounts.
Web Components
Register web components once before rendering custom elements.Environment Variables
Use framework-supported public environment variables for browser credentials.| Framework | Prefix |
|---|---|
| Next.js | NEXT_PUBLIC_ |
| Vite | VITE_ |
| Astro | PUBLIC_ |
| Create React App | REACT_APP_ |
Development And Production
Use test credentials for development and live credentials for production.Next Steps
- Quickstart - Render the first experience.
- Testing - Test public journey states.
- Configuration Reference - Review the full public option list.