Related services: CookiesService —
lynkow.cookies.getConfig(),lynkow.cookies.logConsent()| ConsentService —lynkow.consent.acceptAll(),lynkow.consent.destroy(),lynkow.consent.getCategories(),lynkow.consent.getConfig(),lynkow.consent.hasConsented(),lynkow.consent.hide(),lynkow.consent.logConsent(),lynkow.consent.rejectAll(),lynkow.consent.reset(),lynkow.consent.setCategories(),lynkow.consent.show(),lynkow.consent.showPreferences()
ConsentCategories
Interface
Consent categories
Property | Type | Optional | Description |
|---|---|---|---|
|
| No | Analytics cookies |
|
| No | Marketing cookies |
|
| No | Always true, not modifiable |
|
| No | Preference cookies |
CookieCategory
Interface
A cookie consent category grouping related cookies and scripts. Users accept or reject entire categories (not individual cookies).
Property | Type | Optional | Description |
|---|---|---|---|
|
| No | Description explaining what cookies in this category do.<br>Displayed in the consent banner's detailed/customize view. |
|
| No | Machine-readable category identifier.<br>Standard values: |
|
| No | Human-readable category name displayed in the consent banner. |
|
| No | Whether this category is required and cannot be toggled off by the user.<br>Always |
CookieConfig
Interface
Full cookie consent banner configuration.
Returned by cookies.getConfig().
Contains all settings needed to render and manage a GDPR-compliant consent banner.
Property | Type | Optional | Description |
|---|---|---|---|
|
| Yes | Border radius in pixels for the banner container and buttons.<br>Use |
|
| No | Cookie categories that users can accept or reject.<br>Always includes at least a |
|
| Yes | How consent is handled:<br>- |
|
| Yes | URL to a dedicated cookie policy page (separate from the privacy policy).<br> |
|
| No | Whether the cookie consent banner is enabled for this site.<br>When |
|
| Yes | Font size in pixels for the banner text.<br>Constrained to the range 11-17. Values outside this range are clamped. |
|
| No | Banner layout style. Currently only |
|
| No | Screen position of the floating consent banner.<br>- |
|
| Yes | Primary accent color for buttons and interactive elements.<br>Format: 6-digit hex with |
|
| Yes | URL to the site's privacy policy page.<br> |
|
| Yes | Whether to show the "Customize" button that lets users pick categories individually.<br>When |
|
| Yes | Whether to automatically show the banner on the user's first visit.<br>When |
|
| No | Localized text strings for the banner UI.<br>All strings are ready for display without further formatting. |
|
| No | Color theme for the banner:<br>- |
|
| Yes | Per-theme color overrides for light and dark modes.<br>Only relevant when theme is |
|
| Yes | Third-party scripts to inject based on the user's consent preferences.<br>Each script is tied to a category; only inject scripts whose category<br>the user has accepted. Empty array when no scripts are configured. |
CookiePreferences
TypeAlias
Map of cookie category IDs to the user's consent decision.
true means the user accepted that category; false means rejected.
Used when calling cookies.logConsent() to record preferences.
type CookiePreferences = Record<string, boolean>CookieTexts
Interface
Localized text strings for the cookie consent banner. All fields are pre-configured by the site admin and ready for display.
Property | Type | Optional | Description |
|---|---|---|---|
|
| No | Label for the "Accept All" button that grants consent for all categories. |
|
| No | Label for the "Customize" button that opens the detailed category preferences. |
|
| No | Main description/message shown in the cookie banner.<br>Typically explains that the site uses cookies and links to the privacy policy. |
|
| No | Link text pointing to the privacy/cookie policy page. |
|
| No | Label for the "Reject All" button that only allows necessary cookies. |
|
| No | Label for the "Save" button in the detailed preferences view.<br>Saves the user's per-category choices. |