Nuxt Components
ConsentDialogLink
Add the link to your footer
The Nuxt module registers ConsentDialogLink globally. Put it in your
footer without an import:
Pass content in the default slot to change the label. The embed example uses it inside a placeholder as "Choose video permissions".
What ConsentDialogLink renders
ConsentDialogLink renders one button that sets activeUI to
'manager', which opens the preference dialog. It matches ConsentDialogLink
in the React adapter. It has no props. The default label is the
consentManagerDialog.title translation, "Privacy Settings" in English.
The link shows it in the visitor's language once init has delivered copy,
and in English until then. Its default slot replaces the label.
The button renders only while the visitor has somewhere to go:
- It is absent until the visitor's policy has resolved.
- It is absent when the policy owes no consent UI, such as a policy with no prompt and no rights.
The link opens the dialog only if something renders ConsentManager.
ConsentRoot does.
Accessibility and styling
The component is a native button with type="button", so it works with
Enter and Space and has no link semantics. Style it with your own classes on
the element: attributes you pass, such as class, go to the button. It
carries data-testid="consent-dialog-link" and data-c15t-rights, the
policy's rights separated by spaces.
Verify
Load the page under a policy that asks for consent and click Privacy Settings. The preference dialog opens. Under a policy with no prompt and no rights, the button is absent from the DOM.
Next steps
- ConsentDialogTrigger is a floating alternative.
- Composables open preferences from your own button.