@tickboxhq/nuxt

Nuxt 3/4 module for Tickbox consent management
4,712 1
Install
npm install @tickboxhq/nuxt
Latest Version:1.0.1
Vue:3
License:MIT
Last Updated:Aug 27, 2026
Links: GitHub  ·  npm
Maintainer: tpoxa

@tickboxhq/nuxt

Nuxt module for Tickbox. Wires up the Vue adapter, auto-imports useConsent, auto-registers <ConsentBanner>, and reads the consent cookie on the server so SSR'd pages reflect the visitor's choice.

Install

npm install @tickboxhq/nuxt
// nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@tickboxhq/nuxt'],
})
// consent.config.ts (project root)
import { defineConsent, jurisdictions } from '@tickboxhq/core'

export default defineConsent({
  jurisdiction: jurisdictions.UK_DUAA,
  policy: { version: '2026-05-06', url: '/privacy' },
  categories: {
    necessary: { required: true },
    analytics: { vendors: ['plausible', 'fathom'] },
  },
})

Use it

useConsent is auto-imported. <ConsentBanner> is auto-registered.

<script setup lang="ts">
const { granted, grant, deny } = useConsent('analytics')
</script>

<template>
  <div>
    <p v-if="granted">Analytics on</p>
    <button @click="deny">Turn off</button>
  </div>
</template>

Module options

Option Default Description
configPath '~/consent.config' Path to the consent config file (relative to project root or using ~ / @ aliases)

Version History

Version Released Vue License
1.0.1 ^3.0 MIT
1.0.0 ^3.0 MIT
0.1.3 ^3.0 MIT
0.1.2 ^3.0 MIT
0.1.1 ^3.0 MIT