← All widgets

Offers Card List Widget – Dark Mode Cookie Test

Cookie Controls

Cookie key: userModeTheme

Current cookie value:

The widget polls the userModeTheme cookie every 500 ms and updates dark mode. Removing the cookie falls back to prefers-color-scheme.

Example 1 – Leasing: Audi & Mercedes Diesel (5 offers) data-enable-darkmode + cookie key

data-offer-type="vehicle-leasing-offers" · data-enable-darkmode="true" · data-dark-mode-cookie-key="userModeTheme"

Example 2 – Buy: Electric vehicles (4 offers) OS preference only, no cookie

data-offer-type="vehicle-buy-offers" · data-enable-darkmode="true" · no data-dark-mode-cookie-key → follows OS preference only

Example 3 – Monthly: all offers dark mode disabled

No data-enable-darkmode → widget always stays in light mode regardless of cookie or OS

Example 4 – Monthly: no title, ad notice hidden data-show-ad-notice="false"

data-show-ad-notice="false" → "Anzeige" label is suppressed entirely

Test scenarios

Data attributes

AttributeRequiredDescription
data-offer-typevehicle-monthly-offers | vehicle-leasing-offers | vehicle-buy-offers
data-filter-stringURL-encoded filter params (can be empty for no filter)
data-partner-idPartner ID
data-offer-countNumber of offers to display (default: 5)
data-titleHeading displayed above the widget
data-brand-colorAccent hex color (without #)
data-enable-darkmodetrue to enable dark mode (OS preference + optional cookie)
data-dark-mode-cookie-keyCookie name to poll for dark/light override (e.g. userModeTheme)
data-show-ad-noticeSet to false to hide the "Anzeige" label (shown by default)
data-search-urlBase URL of the search widget instance