EN FR
← Modules

jizy-cooky

A lightweight and extensible GDPR cookie consent manager.

Overview

Cooky is a simple and extensible GDPR cookie consent manager. It only prompts the user when non-technical (third-party) cookies require consent, but its interface remains accessible at all times for informational purposes. Cooky is also exposed on the global window object and supports standard module imports.

Features

  • Automatic alert only when third-party cookies require consent
  • User-accessible consent interface even when no consent is strictly needed
  • Extensible with categories, languages, services and plugins
  • Translation dictionaries for any locale
  • Custom DOM events for show, hide, translate and user responses
  • Built-in observer reacts to DOM changes (e.g. cooky-needs-consent class)

Installation

npm install jizy-cooky

Example

GDPR consent banner. Cooky is already initialised site-wide; the buttons below just drive the banner. Theming is via :root CSS vars — default swatches:

green red blue orange gray darkgray

The full-screen banner's Accept all / I don't care buttons record consent and reload; Personalize opens the settings modal. Its @container query swaps layout at 768px.