Skip to main content
The repository includes a React test harness you can run locally. It lets you switch the active page type, fire nudges, and toggle visibility while observing the widget’s state and context live — a useful reference for the APIs in these docs.

Run it

# from the repo root
npm install
npm run example:react
This starts Vite on http://localhost:3000.

Other scripts

npm run example:react:build    # production build of the playground
npm run example:react:preview  # preview the built playground (port 4174)
The playground source lives in examples/react-playground/src/App.tsx. Many snippets in these docs are taken directly from it.