Skip to content

ConsentBannerDefaultProps

type ConsentBannerDefaultProps = {
copy: Partial<BannerCopy>;
locale: string;
policyUrl: string;
theme: "light" | "dark";
};

Defined in: packages/banner-default/src/react/banner.tsx:7

Type declaration

NameTypeDescriptionDefined in
copy?Partial<BannerCopy>Override individual labels and copy strings. Layered on top of whichever locale is selected, so you can ship in one language and tweak a single label.packages/banner-default/src/react/banner.tsx:20
locale?stringBCP-47 language tag ('en', 'de', 'fr-CH', …) or 'auto' to read from navigator.language. Falls back from the full tag to the language prefix, then to English. Built-in: en, de, fr, es, it, nl, pt, pl, uk.packages/banner-default/src/react/banner.tsx:14
policyUrl?stringURL of the privacy policy linked from the banner. If omitted, the link is hidden. The Tickbox config’s policy.url is the natural source — pass it here.packages/banner-default/src/react/banner.tsx:26
theme?"light" | "dark"Force light or dark theme. By default the banner follows prefers-color-scheme.packages/banner-default/src/react/banner.tsx:31