Cookie consent that ships in your bundle.
Open-source cookie consent SDK for React and Next.js. Manage consent in code, control when third-party tools load, and keep everything in your frontend.
Cookie consent features for React and Next.js
Feature-complete consent, with the control surface a serious project needs.
One consent layer for your stack
Use consent from your app to control when analytics, ads, and other third-party tools can load.
Built to last
Before you add a dependency, you want to know it will still be there.
Frequently asked questions
Do I need a cookie banner in my React app?
If your app sets non-essential cookies or loads tools such as analytics, ads or session replay for visitors covered by GDPR (the EU and UK) or CCPA (California), you need their consent first, or a way to opt out under CCPA. This SDK shows the right banner for each regulation and holds those tools back until the visitor agrees. Check your own obligations with your legal team.
Does it work with the Next.js App Router?
Yes. @cookieyes/nextjs supports the App Router and the Pages Router on Next.js 14 and later. The banner is rendered on the server, and a returning visitor's saved choice is read from the request, so they never see the banner flash in and out.
Is it free and MIT licensed?
Yes. The SDK is open source under the MIT licence, on GitHub. It runs entirely in your frontend: there is no account to create and no dashboard to set up.
How big is the bundle?
The whole banner is 11.5 KB gzipped, measured against an empty Next.js app. The headless core, and every script integration and translation, are separate imports, so you only ship what you use.