CookieConsent

Package

Browser consent banner and category-based script blocking in JavaScript

Price
Free, open source
Access
None, runs locally

About

MIT-licensed JavaScript package for cookie consent banners and preference dialogs. Configure consent categories, translations and script blocking in your site. It stores choices in the browser; a configured banner does not by itself guarantee GDPR compliance or provide a centralized audit ledger.

What you can do with it

  • Let visitors accept or reject optional cookie categories on a website
  • Load analytics scripts only after their required category is accepted
  • Show translated preference dialogs and ask again after a consent revision

Get started

  1. Install vanilla-cookieconsent and import its stylesheet
  2. Configure languages, consent categories and modal text
  3. Mark optional scripts for blocking until their category is accepted

Example

import "vanilla-cookieconsent/dist/cookieconsent.css";
import * as CookieConsent from "vanilla-cookieconsent";
// Run CookieConsent.run with your categories and language configuration.

Details

Hosting
Runs locally
Available in
Worldwide
MCP server
None

Tasks

Alternatives

Other tools for the same tasks.

Last checked on .