UNPKG

c15t

Version:

Headless JavaScript consent management platform for cookie banners, privacy preferences, consent storage, and script gating.

46 lines (34 loc) 1.36 kB
--- title: Consent Dialog Link description: Reference page for consent dialog link. group: reference --- `ConsentDialogLink` is an inline trigger for opening the consent dialog from places like site footers, legal pages, or account settings. It is unstyled by default, so it inherits your app's typography and link/button styles. ## Footer Link (unstyled by default) ```tsx <footer> <ConsentDialogLink> Your privacy settings </ConsentDialogLink> </footer> ``` ## Render as an Anchor Use `asChild` to keep semantic anchor markup while still opening the dialog: ```tsx <ConsentDialogLink asChild> <a href="#privacy-settings">Manage Preferences</a> </ConsentDialogLink> ``` ## Optional Styling Control The component defaults to `noStyle={true}`. Set it to `false` if you want c15t button styles: ```tsx <ConsentDialogLink noStyle={false}> Privacy Settings </ConsentDialogLink> ``` ## Props |Property|Value| |:--|:--| |Type Name|\`ConsentDialogLinkProps\`| |Source Path|\`./packages/react/src/components/consent-preferences-link/consent-preferences-link.tsx\`| \*ExtractedTypeTable: Could not extract "ConsentDialogLinkProps" from "./packages/react/src/components/consent-preferences-link/consent-preferences-link.tsx" using base path "/home/runner/work/c15t/c15t". Verify the path/name and that the file is included by your tsconfig.\*