Installation

Add the module to your Nuxt app.

Installation

Install the module and its peer dependency, @nuxt/scripts ^1.0.0:

bun add @websideproject/nuxt-cookie-consent @nuxt/scripts

Add it to your modules:

nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@websideproject/nuxt-cookie-consent'],
})

The module registers @nuxt/scripts itself, so useScript and the consent triggers work without adding it to modules. Requires Nuxt 4.

Add the components

Place the components in your layout or app.vue:

app.vue
<template>
  <div>
    <NuxtPage />
    <CookieConsentBanner />
    <CookieConsentModal />
    <CookieConsentFab />
  </div>
</template>
The built-in components are plain CSS, themed from the colors option: no UI framework, Tailwind or icon library needed. To render them with your own UI kit, override them with same-named components.

Next: Configuration.

Need a Landing Page?

Modern landing pages with optional modules (blog, docs, forms, i18n). Let's discuss your project.

Build Your MVP

Full-stack SaaS development. Expert in database design, multi-tenancy, and scalable architecture.

Deployment Help

Dockerize your backend, set up CI/CD pipelines, deploy to Cloudflare or Hetzner. Early-stage setup.

Suggest a SaaS Tool

Missing a calculator or tool? Suggest what you'd like to see on our site.