Skip to main content

CMPBaseWindowOptions

Electron APIs / app / CMPBaseWindowOptions

What the CMP window (openCMPWindow) and the CMP first layer (openCMPFirstLayerWindow) share: the parent window and the page's language, colors and font. A color or font left out keeps the page's own.

Extended by​

Properties​

PropertyTypeDescription
backgroundColor?stringThe background color: the CMP window's (its preloader and the page) or the first layer dialog's. Default is '#0D0D0D'.
buttonColor?stringThe "Accept All Purposes" button color, e.g. '#3b96be'. In the CMP window also the consent switches, the active tab underline and the preloader spinner (unless preLoaderSpinnerColor is set).
buttonHoverColor?stringThe "Accept All Purposes" button (and consent switch) hover color. Default is a brighter buttonColor.
buttonTextColor?stringThe "Accept All Purposes" button text color. Default is '#ffffff'.
fontFamily?stringThe font-family list for the page, e.g. 'Roboto, "Segoe UI", sans-serif' - an installed font, or one fontUrl loads. Letters, digits, spaces, quotes, commas, dots and dashes only. Default is the page's font.
fontUrl?stringA Google Fonts css url that loads fontFamily, e.g. 'https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap'. Urls on other hosts are ignored.
language?stringThe page language, e.g. 'de' or 'zh-tw'. Falls back to 'en' for a language the page doesn't have. Default is 'en'.
modal?booleanWhether the window is modal to its parent. This only works with a parent. Default is false.
parent?anyThe parent window. The CMP window opens centered over it; the first layer covers its content area (see openCMPFirstLayerWindow). Without it, both open over the focused window.
textColor?stringThe text color. Default is the page's grays.
titleColor?stringThe titles, links (and the first layer's app name, the CMP window's "Reject All Purposes") color. Default is textColor when it is set, the page's otherwise.