Work · Open source · 2025 · Auxel Labs
OpenConsent
GDPR-compliant cookie consent for React and Next.js with Google Consent Mode v2 built in, installed through the shadcn/ui registry.
What it is
GDPR-compliant cookie consent for React and Next.js, free and open source under the MIT license. It ships as source through the shadcn/ui registry rather than as a package, so a team owns the code it installs:
npx shadcn@latest add https://openconsent.dev/r/cookie-consent.json
Who it’s for
Teams running React or Next.js sites with EU, EEA or UK traffic, where Google Consent Mode v2 has been required since March 2024.
What ships
- Google Consent Mode v2 built in, plus GDPR and CCPA compliance with granular categories, easy withdrawal and consent versioning.
- Third-party scripts that load and unload automatically as consent changes.
- An audit trail through a configurable API endpoint, and consent persisted in localStorage.
- A banner, settings dialog and trigger built from shadcn/ui primitives, fully typed in TypeScript.
How it’s built
Next.js and React with Tailwind CSS and Radix-based shadcn/ui components; the banner animates with Framer Motion. Behaviour is covered by Vitest and Testing Library suites for the banner, the provider, the trigger, script detection and the Consent Mode integration.
Contact
Let’s build something considered.
For senior frontend roles, product collaborations, or to compare notes on building things next to a day job, email is the fastest way to reach me.