Documentation
ConsentBanner
| Prop | Type | Default | Description |
|---|---|---|---|
title | ReactNode | translation | Overrides the title. Under a notice the default is cookieBanner.noticeTitle. |
description | ReactNode | translation | Overrides the description. Under a notice the default is cookieBanner.noticeDescription. |
acceptButtonText | ReactNode | common.acceptAll | Accept label. |
rejectButtonText | ReactNode | common.rejectAll | Reject label. |
customizeButtonText | ReactNode | common.customize | Customize label. |
dismissButtonText | ReactNode | common.acknowledge | Label of the notice acknowledgement. |
variant | PromptVariant | floating | Shape of the prompt. See Variants. |
position | PromptPosition | per variant | Where the prompt sits. Must be valid for the variant. |
blocking | boolean | true on wall | Backdrop, scroll lock, focus trap, and no outside dismissal, as one value. |
layout | ConsentBannerLayout | policy default | Orders and groups actions. Required actions the layout omits are restored. |
primaryButton | ConsentBannerButton | ConsentBannerButton[] | 'customize' | Which actions get the primary treatment. On a notice, dismiss is primary when it is the only action. |
direction | 'row' | 'column' | 'row' | How action groups flow. |
legalLinks | (keyof LegalLinks)[] | null | none | Which configured legal links render inline. |
hideBranding | boolean | false | Hides the "Secured by" tag. |
scrollLock | boolean | unset | Deprecated. Use blocking to control scrolling, focus and backdrop together. |
trapFocus | boolean | unset | Deprecated. Use blocking. |
disableAnimation | boolean | false | Skips enter and exit animations. |
noStyle | boolean | false | Removes the built-in styling from every part. |