CMPFirstLayerWindowOptions
Electron APIs / app / CMPFirstLayerWindowOptions
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.
Extends
Properties
| Property | Type | Description |
|---|---|---|
appName? | string | The product name shown in the text. Default is app.getName(). |
backdrop? | boolean | Whether to dim the parent's content behind the dialog. Default is true with a parent, false without one. |
backgroundColor? | string | The background color: the CMP window's (its preloader and the page) or the first layer dialog's. Default is '#0D0D0D'. |
buttonColor? | string | The "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? | string | The "Accept All Purposes" button (and consent switch) hover color. Default is a brighter buttonColor. |
buttonTextColor? | string | The "Accept All Purposes" button text color. Default is '#ffffff'. |
cmpFirstLayerURL? | string | Overrides the first layer page url. |
fontFamily? | string | The 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? | string | A 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? | string | The page language, e.g. 'de' or 'zh-tw'. Falls back to 'en' for a language the page doesn't have. Default is 'en'. |
modal? | boolean | Whether the window is modal to its parent. This only works with a parent. Default is false. |
parent? | any | The 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. |
preLoaderSpinnerColor? | string | The preloader spinner color of the CMP window "Manage" opens. Default is buttonColor when it is set, '#D34037' otherwise. |
textColor? | string | The text color. Default is the page's grays. |
titleColor? | string | The 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. |