ConsentDialog
ConsentDialog is a modal that shows toggles for each consent category. In opt-in jurisdictions, it typically opens when users click "Customize" on ConsentBanner. It can also be controlled programmatically for use on settings pages regardless of jurisdiction.
Basic Usage
Controlled State
By default, the dialog follows activeUI === 'dialog' from the consent store. Use the open prop for manual control:
Or use the hook to open it programmatically:
Floating Trigger
Add a floating button that lets users re-open the dialog after dismissing the banner:
Branding
Hide the c15t branding tag:
Styling First
Info
If you are only changing visuals, stay with the stock dialog and use the theme system first. Start with tokens and slots such as consentDialogCard, consentWidgetFooter, and consentDialogTag. See Styling Overview.
Dialog copy should be changed through ConsentManagerProvider.options.i18n, not by rebuilding the dialog structure.
Advanced: Compound Components
Use compound components only when you need custom dialog markup while still keeping c15t primitives and policy-aware footer actions:
ConsentDialog.Root— Portal container with focus trap, scroll lock, and animationConsentDialog.Card— Main dialog cardConsentDialog.Header— Contains title and descriptionConsentDialog.HeaderTitle— Dialog titleConsentDialog.HeaderDescription— Description with optionallegalLinksConsentDialog.Content— Main content area (typically containsConsentWidget)ConsentDialog.Footer— Footer with optional branding (hideBrandingprop)ConsentDialog.Overlay— Backdrop overlayConsentWidget.PolicyActions— Renders policy-aware grouped dialog actions
For a quick pre-composed layout, use the shorthand card:
ConsentWidget.PolicyActions uses stock c15t widget buttons and translations by default. Pass renderAction only when you need to customize the action mapping, and return stock widget button compounds if you want to preserve built-in behavior and copy.
For fully manual control over dialog action rendering, use useHeadlessConsentUI() and map dialog.actionGroups yourself.
If the stock dialog structure still works, prefer tokens, slots, and provider configuration instead.