Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By websideprojectMITIn 1 marketplace
Skills for nuxt-cookie-consent: consent categories, banner/modal/floating button, $consent, useRequestConsent, useConsentCookie, consent-gated scripts, and custom UI
Claude loads one when your task matches it, or you run it by name.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Cookie and cookieless-tracking consent for Nuxt 4. Declare your categories in nuxt.config.ts and get a banner that
only appears when something actually needs consent, a preferences modal, a floating settings button, and composables
to gate scripts and cookies behind each category.
Disclaimer: This module provides tools to help you comply with privacy regulations like GDPR, but using it does not automatically guarantee compliance. You are solely responsible for your site's configuration, cookie descriptions, and overall privacy practices. Always consult a legal professional. The author assumes no liability for any legal issues arising from its use.
kind: 'cookie' categories list provider and duration; kind: 'tracking' ones (e.g. cookieless analytics) are a plain toggle, opt-out by defaultconsentVersion changes, or the choice is older than expiresInDaysconsent:changed, consent:granted and consent:revoked Nuxt runtime hooksdefault and update commands from your categoriesuseRequestConsent asks for one category at the moment a feature needs ituseConsentCookie writes only after consent; $consent.triggers.<category> loads a script through Nuxt Scripts once grantedcolors; override any of them with a same-named component in your own UI kit$consent and the composables as the consent store and render your own UI, or noneInstall the module and its peer dependency:
# npm
npm install @websideproject/nuxt-cookie-consent @nuxt/scripts
# pnpm
pnpm add @websideproject/nuxt-cookie-consent @nuxt/scripts
# bun
bun add @websideproject/nuxt-cookie-consent @nuxt/scripts
Add it to your nuxt.config.ts and declare your categories:
export default defineNuxtConfig({
modules: ['@websideproject/nuxt-cookie-consent'],
cookieConsent: {
categories: {
necessary: { readonly: true },
analytics: { kind: 'tracking', description: 'Cookieless, anonymous usage statistics.' },
},
},
})
The module registers @nuxt/scripts itself, so don't add it to modules. Then render the components once, in
app.vue or a layout:
<template>
<NuxtPage />
<CookieConsentBanner />
<CookieConsentModal />
<CookieConsentFab />
</template>
<script setup lang="ts">
const { $consent } = useNuxtApp()
// A script that is requested only once "analytics" is granted
useScript('https://example.com/analytics.js', { trigger: $consent.triggers.analytics })
// A cookie that is written only once "preferences" is granted
const theme = useConsentCookie<'light' | 'dark'>('theme_preference', 'preferences', { default: () => 'light' })
async function toggleTheme() {
// Opens the settings modal for "preferences" if it is not granted yet
if (await useRequestConsent('preferences')) theme.value = theme.value === 'light' ? 'dark' : 'light'
}
</script>
Configuration, the full $consent API, custom components and headless use are in the
module README and the documentation.
The repo's playground renders the built-in components; the pictures are its CI screenshots.
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub websideproject/nuxt-cookie-consent --plugin nuxt-cookie-consent-skillsPlugins from other owners that cover similar ground