nuxt-x-marketing
PrivacyGDPR
Modal for granular cookie category preferences with toggles for required and optional categories.
PrivacyGDPR
A modal providing granular cookie category controls. Required categories are shown with a locked toggle. Users can accept all, reject all, or save a custom selection. Links to Privacy Policy and Cookie Policy pages are shown at the bottom.
Components
<XMarkPrivacyGDPR />
A modal providing granular cookie category controls. Required categories are shown with a locked toggle. Users can accept all, reject all, or save a custom selection. Links to Privacy Policy and Cookie Policy pages are shown at the bottom.
<XMarkPrivacyGDPR
v-model="gdprOpen"
title="Privacy Preferences"
description="Choose which cookies you allow us to use."
:categories="[
{
id: 'necessary',
name: 'Necessary',
description: 'Required for the site to function.',
required: true,
},
{
id: 'analytics',
name: 'Analytics',
description: 'Help us understand how visitors use the site.',
required: false,
},
{
id: 'marketing',
name: 'Marketing',
description: 'Used for targeted advertising.',
required: false,
},
]"
privacy-link="/privacy"
cookie-link="/cookies"
@save="onConsentSaved"
/>
Props
| Prop | Type | Default | Description |
|---|---|---|---|
modelValue | Boolean | false | Controls modal visibility (v-model) |
title | String | 'Privacy Preferences' | Modal heading |
description | String | Default description | Introductory text |
categories | Array | 3 default categories | Cookie categories [{ id, name, description, required }] |
privacyLink | String | '' | Privacy Policy page URL |
cookieLink | String | '' | Cookie Policy page URL |
Emits
| Event | Payload | Description |
|---|---|---|
save | selections: Object | Selected category IDs map when user saves preferences |
AI Context
category: Privacy
package: "@xenterprises/nuxt-x-marketing"
components:
- XMarkPrivacyGDPR
use-when: >
Providing granular cookie category opt-in/opt-out when GDPR compliance
requires it. Typically triggered by the "Customize" action in
XMarkPrivacyCookieBanner or a "Cookie Settings" link in the footer.
typical-page-section: Modal overlay — triggered from cookie banner or footer link.
