> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cookiechimp.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Examples

> Runnable Next.js and plain React/Vite apps.

Runnable apps live in [`examples/`](https://github.com/cookiechimp/cookiechimp-sdk/blob/main/examples/nextjs-app-router/README.md).
The three web apps are built and tested end to end in CI on every pull request.

Start with the [backend-connected walkthrough](https://docs.cookiechimp.com/docs/sdk/connected-backend.md) when using
a CookieChimp account. The React/Vite app's `/connected` page retrieves real
dashboard config and delivers consent records with matching receipt status.

| Example | Shows |
| - | - |
| `examples/nextjs-app-router` | `CookieChimpProvider` (server), banner, preferences, recall button, a gated GA4 tag, `useCategory`. |
| `examples/react-vite` | `/connected`: CookieChimp backend config, categories, copy, cookie settings, consent delivery, receipts and retries. `/platform.html`: 16 actual-SDK presets, category/vendor details, desktop/mobile previews, JSON export, complete service state and saved-choice replay. `/`: local runtime, script gating, persistence, preferences and recall. |
| `examples/nextjs-pages-router` | `withConsent` and `PagesConsentProvider` with the same UI. |
| `examples/react-native-expo` | The React Native SDK in Expo: native banner and preferences, a headless custom UI, language switching, the debug panel, vendor presets, Firebase Consent Mode and the App Tracking Transparency helper with stand-in SDKs, offline sample config or a live account. Outside the pnpm workspace and not run in CI; see its README. |

```sh theme={null}
pnpm install
pnpm --filter @cookiechimp/example-nextjs-app-router... build
pnpm --filter @cookiechimp/example-nextjs-app-router start
```

Outside the monorepo, replace the `workspace:*` versions with published ones.

See [Banner and vendor preferences](https://docs.cookiechimp.com/docs/sdk/platform-ui.md#try-all-variations) for the
playground controls and setup. Its sample vendors never load tracking tags or
send records. The separate `/connected` example is for backend delivery.
