Nuxt Cookie Consent
GDPR cookie and cookieless-tracking consent for Nuxt — banner, floating button and preferences modal, all overridable.
Consent for what your site actually does: real cookies get a provider/duration table, cookieless tracking gets an honest toggle, and the banner appears only when something needs it.
Cookies and cookieless tracking
Every category declares what it is, and the UI follows.
kind: 'cookie'— backed by device storage; the modal lists each cookie with provider and durationkind: 'tracking'— cookieless analytics or session replays; a labelled toggle, no fake cookie tablenecessaryis always on;readonlycategories are disclosed but not switchable
A banner only when it's needed
- The banner shows on the first visit only if a category requires it (
requiresBanner) - Cookieless analytics can run as an opt-out — no banner, a toggle in the floating button
- Opt-in categories without a banner (
defaultEnabled: false) — e.g. replays, off until switched on - Stale decisions are detected: add a category and visitors are asked once more
Built for overriding
CookieConsentBanner,CookieConsentFab,CookieConsentModal— replace any of them with your own markupuseConsentBanner,useConsentModal,useConsentFab,useConsentTextcarry the state and handlersuseConsentCookiewrites a cookie only after its category is consented touseRequestConsentasks for one category just in time