> ## 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).
All three are built and tested end to end in CI on every pull request.

| Example | Shows |
| - | - |
| `examples/nextjs-app-router` | `CookieChimpProvider` (server), banner, preferences, recall button, a gated GA4 tag, `useCategory`. |
| `examples/react-vite` | Plain React/Vite, one local runtime, StrictMode, consent-gated script, persistence, preferences and recall. |
| `examples/nextjs-pages-router` | `withConsent` and `PagesConsentProvider` with the same UI. |

```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.
