Lightweight cookie-consent plugin in vanilla JavaScript for GDPR consent banners and settings
Repository activity
- Stars5.5k
- Forks506
- Open Issues59
License
MIT
Languages
- JavaScript
- SCSS
- Astro

About CookieConsent
CookieConsent is a cookie-consent banner plugin written in plain JavaScript for adding consent notices and a cookie settings modal to websites. It is cross-browser and aimed at GDPR-compliant consent flows.
You add it to a page as a script and configure the consent and settings modals to match the site. A playground and StackBlitz examples are available, and it ships as an npm package. It handles front-end consent collection without a backend or account system.
CookieConsent (v3) is distributed under the MIT License. Because it is a client-side widget you embed and serve yourself, it runs entirely on your own site.
Key features
- Cookie-consent banner in vanilla JavaScript
- Configurable cookie settings modal
- Cross-browser, GDPR-oriented consent flow
- Available as an npm package
Details
- On GitHub since
- 2020
- License
- MIT
- Language
- Vanilla JavaScript
- Distribution
- npm package or self-hosted
- Type
- Client-side consent widget