Introduction
What nuxt-cookie-consent is and the problems it solves.
Introduction
@websideproject/nuxt-cookie-consent is a cookie and cookieless-tracking consent module for Nuxt 4.

This module provides tools to help you comply with privacy regulations like GDPR, but using it does not automatically guarantee compliance. You are responsible for your site's configuration, cookie descriptions, and overall privacy practices. Always consult a legal professional. The author assumes no liability for legal issues arising from its use.
Features
- GDPR compliant — granular control, stale-cookie detection, and consent-gated cookie writing.
- Intelligent banner — the initial banner only appears if a configured non-essential cookie actually requires it.
- Dynamic i18n — fully translatable UI (including cookie categories) with reactive locale switching. Defaults for EN, DE, ES, FR.
- Fully configurable — define categories, colors, and text in
nuxt.config.ts. - On-demand consent —
useRequestConsentasks for permission just-in-time. - Preferences without a banner — a theme or language switch asks for consent the first time it is used; until then no cookie is set and no banner is needed. See Usage.
- Consent-aware cookies —
useConsentCookiefor effortless, compliant cookie management. - Overridable & themeable UI — components can be styled via config or replaced entirely using Nuxt Layers.
- Powered by Nuxt Scripts — exposes consent-based triggers for efficient script loading.
How it works
- You declare your cookie categories (and optionally the individual cookies inside them) in
nuxt.config.ts. - On first visit, the module decides whether to show the banner based on the
requiresBannerflags of your non-essential cookies. - The user's choices are stored in a
cookie_consentcookie and exposed through$consentand a set of composables. - You gate scripts and cookies behind the relevant category using
$consent.triggers,useConsentCookie, anduseRequestConsent.
Continue to Installation.
Overview
GDPR cookie and cookieless-tracking consent for Nuxt — banner, floating button and preferences modal, all overridable.
Installation
Add the module to your Nuxt app.