gov-cookiebar
Properties
| Property | Attribute | Description | Type | Default |
|---|---|---|---|---|
accessibleBadgeLabel | accessible-badge-label | Aria label of the floating badge button. | string | 'Otevřít nastavení cookies' |
accessibleCloseLabel | accessible-close-label | Accessible label of the settings modal close button. | string | 'Zavřít podrobné nastavení' |
accessibleLabel | accessible-label | Aria label of the cookie bar dialog. | string | 'Nastavení souhlasu s cookies' |
badge | badge | Renders a floating badge to reopen the bar after a choice was saved. | boolean | true |
categories | categories | Cookie categories configuration. Accepts an array or a JSON string. | CookieCategory[] | string | undefined |
cookieName | cookie-name | Name of the cookie holding the consent. | string | 'gov-cookiebar-consent' |
expiration | expiration | Consent validity in days. | number | 365 |
labelAccept | label-accept | Text of the accept-all button. | string | 'Souhlasím se všemi' |
labelAlwaysOn | label-always-on | Label of the chip marking always-on (required) categories. | string | 'Vždy zapnuto' |
labelCookieDetails | label-cookie-details | [DEPRECATED] No-op since the redesign — the per-cookie table was replaced by the label-privacy / privacy-url link. Kept for backward compatibility.Label of the collapsible cookie declaration inside a category. | string | 'Seznam cookies' |
labelCookieExpiration | label-cookie-expiration | [DEPRECATED] No-op since the redesign — the per-cookie table was removed. Kept for backward compatibility. Header of the cookie expiration column in the declaration table. | string | 'Platnost' |
labelCookieName | label-cookie-name | [DEPRECATED] No-op since the redesign — the per-cookie table was removed. Kept for backward compatibility. Header of the cookie name column in the declaration table. | string | 'Název' |
labelCookieProvider | label-cookie-provider | [DEPRECATED] No-op since the redesign — the per-cookie table was removed. Kept for backward compatibility. Header of the cookie provider column in the declaration table. | string | 'Poskytovatel' |
labelCookiePurpose | label-cookie-purpose | [DEPRECATED] No-op since the redesign — the per-cookie table was removed. Kept for backward compatibility. Header of the cookie purpose column in the declaration table. | string | 'Účel' |
labelPrivacy | label-privacy | Text of the privacy-policy link inside the settings modal. | string | 'Zpracování osobních údajů a cookies' |
labelReject | label-reject | Text of the reject button. | string | 'Odmítnout všechny' |
labelSave | label-save | Text of the save button inside the settings modal. | string | 'Uložit nastavení' |
labelSettings | label-settings | Text of the settings button. The button renders only when categories are provided. | string | 'Podrobné nastavení' |
labelSettingsTitle | label-settings-title | Title of the detailed settings modal. | string | 'Podrobné nastavení cookies' |
privacyUrl | privacy-url | URL of the privacy-policy link inside the settings modal. Supplied by the application. The link renders only when a non-empty URL is provided. | string | '' |
Events
| Event | Description | Type |
|---|---|---|
gov-consent | Emitted when the user saves a consent choice. | CustomEvent<CookiebarConsentEvent> |
Methods
getConsent() => Promise<CookiebarConsent | null>
Returns the stored consent or null when no valid consent exists.
Returns
Type: Promise<CookiebarConsent>
show() => Promise<void>
Reopens the bar; opens directly the settings panel when categories are configured.
Returns
Type: Promise<void>
Dependencies
Depends on
Graph
Built with StencilJS