ConsentDialogTrigger
ConsentDialogTrigger is a floating button that opens the consent dialog when clicked. Users can drag it to any corner of the screen, and the position persists across sessions. Use it to give users a persistent way to manage their privacy settings.
Basic Usage
Use standalone or via the showTrigger prop on ConsentDialog:
For inline footer links (instead of a floating button), use ConsentDialogLink.
Icon Options
Configurable Toolbar
Use the separate ConsentDialogTriggerToolbar when you want to place app-owned controls beside the privacy trigger. It always renders exactly one built-in action that opens consent preferences, so actions only contains controls your app owns.
Each custom action requires a stable id, accessible label, icon, and onSelect callback. Use pressed for toggle actions and disabled for unavailable actions. Your app remains responsible for state, integrations, and changing the icon or label. The preferences action automatically moves to the edge nearest the toolbar's snapped corner while custom actions keep their configured order.
Toolbars are horizontal by default. Set orientation="vertical" to stack the actions and enable Up/Down arrow-key navigation:
Toolbar Styling
The toolbar follows the standard styling precedence: internal CSS module styles, provider theme slots, then direct component overrides. Use className and style on the toolbar, or on an individual action, and use noStyle for a fully custom implementation.
Available toolbar theme slots are consentDialogTriggerToolbar, consentDialogTriggerToolbarItem, and consentDialogTriggerToolbarIcon.
With noStyle, use data-corner, data-dragging, and data-snapping on the toolbar to style its current position and interaction state.
Visibility
Control when the trigger is visible:
Position
Set the default corner and control persistence:
Size
Compound Components
Build fully custom trigger layouts using sub-components:
ConsentDialogTrigger.Root— Portal wrapper with drag handling and position persistenceConsentDialogTrigger.Button— Draggable button element with size variantsConsentDialogTrigger.Icon— Icon display (branding, fingerprint, settings, or custom)ConsentDialogTrigger.Text— Optional text label
Props
ConsentDialogTrigger
Warning: ExtractedTypeTable: Could not extract "ConsentDialogTriggerProps" from "./packages/react/src/components/consent-dialog-trigger/types.ts" using base path "/vercel/path0/apps/c15t-docs/.leadtype/c15t". Verify the path/name and that the file is included by your tsconfig.
ConsentDialogTriggerToolbar
Warning: ExtractedTypeTable: Could not extract "ConsentDialogTriggerToolbarProps" from "./packages/react/src/components/consent-dialog-trigger/types.ts" using base path "/vercel/path0/apps/c15t-docs/.leadtype/c15t". Verify the path/name and that the file is included by your tsconfig.
Toolbar Actions
Warning: ExtractedTypeTable: Could not extract "ConsentDialogTriggerToolbarAction" from "./packages/react/src/components/consent-dialog-trigger/types.ts" using base path "/vercel/path0/apps/c15t-docs/.leadtype/c15t". Verify the path/name and that the file is included by your tsconfig.
Preferences Action
Warning: ExtractedTypeTable: Could not extract "ConsentDialogTriggerToolbarPreferences" from "./packages/react/src/components/consent-dialog-trigger/types.ts" using base path "/vercel/path0/apps/c15t-docs/.leadtype/c15t". Verify the path/name and that the file is included by your tsconfig.