Skip to content

ConsentBannerDefaultProps

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

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

Type declaration

NameTypeDescriptionDefined in
branding?booleanWhen true, adds a small “Powered by Tickbox” link to tickbox.dev under the banner. Off by default — most sites won’t want third-party branding on a compliance widget. Local-only setting; not part of the remote-theme payload, since whether to credit the SDK is a code-level decision, not a marketing-team one.packages/banner-default/src/react/banner.tsx:56
cloudEndpoint?stringDefaults to https://api.tickbox.dev. Override only for self-hosting.packages/banner-default/src/react/banner.tsx:48
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:27
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:21
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:33
siteId?stringSite identifier from app.tickbox.dev. When set, the banner fetches its remote presentation theme (copy + colours) on mount from cloudEndpoint/v1/theme/{siteId} and applies it on top of copy. Last fetched theme is cached in localStorage so the next page load renders synchronously with no flicker.packages/banner-default/src/react/banner.tsx:46
theme?"light" | "dark"Force light or dark theme. By default the banner follows prefers-color-scheme.packages/banner-default/src/react/banner.tsx:38