Skip to main content

WemapTheme

wemap-sdk-js


Interface: WemapTheme

SDK-wide visual design tokens.

Theme lives in @wemap/core (not @wemap/map) so every UI-bearing package — @wemap/map today, a future @wemap/ui — resolves the same tokens and stays visually consistent. Core owns the token data and the CSS-variable name contract; it ships no CSS. Each UI package styles its own DOM against var(--wemap-*).

Tokens are SDK-specific and are not read from the livemap snippet. Set them via core.init({ theme }); unset fields fall back to DEFAULT_THEME.

See

docs/adr/0001-theming-tokens-in-core.md

Properties

colorOnPrimary

colorOnPrimary: string

Content (icon/text) rendered on top of colorPrimary.


colorOnSurface

colorOnSurface: string

Content (text/icon) rendered on top of colorSurface.


colorPrimary

colorPrimary: string

Brand colour — markers, cluster bubbles, route line, user location, highlights.


colorSurface

colorSurface: string

Background of surfaces such as controls and popups.