CookiezyCookiezy
ProductPlatformsDevelopersPricingBlog
Platform page

Cookie Consent for React

Cookiezy is designed for React teams that need a lightweight consent layer, clean state handling, and a user experience that works inside SPA-style applications. The React rollout uses the same plain-headless adapter files shipped in `platform-cookie-core.zip` and loads them from the app shell.

Built for React applications where frontend quality and performance both matter.

Cookie banner preview

Lightweight. Fast. Clear by default.

Cookie consent. Done easy.

Lightweight consent that keeps your site fast and your data intact.

Necessary
Analytics
Marketing
After purchase

What the React package includes

After payment you download `platform-cookie-core.zip`. For React you use the plain adapter from `packages/adapters/plain-html/` and the shared core assets from `packages/core/dist/`.

  • • `packages/adapters/plain-html/headless-bootstrap.js`
  • • `packages/core/dist/cookie-consent.js`
  • • `packages/core/dist/cookie-consent-ui.js`
  • • `packages/core/dist/cookie-consent-scanner.js`
  • • `packages/core/dist/cookie-consent.css`
  • • `packages/adapters/plain-html/example.html` as the baseline integration reference
Cookiezy React setup screenshot showing the shell bootstrap, verify URL, and consent-aware gating flow.
Reference view: React rollout uses the shared plain adapter from the app shell.
Step 1

Copy the adapter files into your React public assets

Extract `platform-cookie-core.zip` and copy `headless-bootstrap.js` plus the shared core files into `public/` or another asset path your React app can serve globally.

Code snippet

public/headless-bootstrap.js
public/cookie-consent.js
public/cookie-consent-ui.js
public/cookie-consent-scanner.js
public/cookie-consent.css
Step 2

Boot Cookiezy from the React app shell

Load the assets once from your root HTML shell or top-level React layout. Boot the plain adapter before the UI and scanner scripts so the consent runtime is configured for the whole SPA.

Code snippet

<link rel="stylesheet" href="/cookie-consent.css" />
<script src="/headless-bootstrap.js"></script>
<script src="/cookie-consent.js"></script>
<script>
  window.CookiezyPlainAdapter.boot({
    locale: "en",
    storageKey: "cookiezy_react_v1",
    policyUrl: "/en/cookie-policy",
    theme: { layout: "bottom-right", themeClass: "" },
    texts: {}
  });
</script>
<script src="/cookie-consent-ui.js"></script>
<script src="/cookie-consent-scanner.js"></script>
Step 3

Wire the settings link and gate optional services in React

After Cookiezy loads, register the settings link and use the consent state to decide when analytics or marketing tools should start inside your React app.

Code snippet

window.CookiezyPlainAdapter.registerSettingsLink(document);

const consent = window.Cookiezy?.getConsent();
if (consent?.analytics) {
  startAnalytics();
}
if (window.location.pathname === '/en/cookie-policy') {
  window.CookiezyPlainAdapter.mountAudit(document);
}
Features

React-friendly consent features

Built for apps that care about clean integration rather than plugin-style complexity.

SPA-safe behavior

A better fit for React applications where route changes happen client-side.

Simple consent state

Keep category choices readable and easier to integrate into your app logic.

Audit-ready policy page

Use the adapter helpers to register the settings link and mount the policy page audit.

Consent-aware analytics

Gate optional scripts and integrations based on the user's explicit consent.

Ship it

Use Cookiezy in your React app

Choose a consent layer that fits modern React products without adding unnecessary frontend weight.

FAQ

React cookie consent FAQ

Quick answers for React teams evaluating Cookiezy.

Which ZIP should I use for React?

Use `platform-cookie-core.zip` and integrate the plain adapter from `packages/adapters/plain-html/` with the shared core files from `packages/core/dist/`.

Should I load Cookiezy once at the root of the app?

Yes. The intended React pattern is to load the scripts once from the app shell so the consent layer survives client-side navigation.

Can I use Cookiezy consent state in my React logic?

Yes. The packaged runtime exposes consent state so optional analytics and marketing code can wait until the user opts in.

How do I show the audit on the policy page?

Call `window.CookiezyPlainAdapter.mountAudit(document)` on the policy route after the scanner script is loaded.

Cookiezy

Lightweight consent platform for modern websites.

Product

FeaturesPlatformsPricingDocsBlog

Legal

Cookie PolicyPrivacy PolicyTerms

Language

Cookie settings

© 2026 Cookiezy. All rights reserved.