Skip to main content

Documentation

ConsentBanner

PropTypeDefaultDescription
titleReactNodetranslationOverrides the title. Under a notice the default is cookieBanner.noticeTitle.
descriptionReactNodetranslationOverrides the description. Under a notice the default is cookieBanner.noticeDescription.
acceptButtonTextReactNodecommon.acceptAllAccept label.
rejectButtonTextReactNodecommon.rejectAllReject label.
customizeButtonTextReactNodecommon.customizeCustomize label.
dismissButtonTextReactNodecommon.acknowledgeLabel of the notice acknowledgement.
variantPromptVariantfloatingShape of the prompt. See Variants.
positionPromptPositionper variantWhere the prompt sits. Must be valid for the variant.
blockingbooleantrue on wallBackdrop, scroll lock, focus trap, and no outside dismissal, as one value.
layoutConsentBannerLayoutpolicy defaultOrders and groups actions. Required actions the layout omits are restored.
primaryButtonConsentBannerButton | 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)[] | nullnoneWhich configured legal links render inline.
hideBrandingbooleanfalseHides the "Secured by" tag.
scrollLockbooleanunsetDeprecated. Use blocking to control scrolling, focus and backdrop together.
trapFocusbooleanunsetDeprecated. Use blocking.
disableAnimationbooleanfalseSkips enter and exit animations.
noStylebooleanfalseRemoves the built-in styling from every part.