Skip to content

Theming

The widget ships with a set of built-in theme presets. The active theme can be set via the dashboard, via a data-theme attribute on the container element, or driven dynamically from your page.

Via the container element — set data-theme on the <div id="comments"> element:

<div
id="comments"
data-site-id="YOUR_SITE_ID"
data-page-id="YOUR_PAGE_ID"
data-theme="dark"
></div>

Via the dashboard — open the Sites tab, find your site, and choose a theme from the theme picker. This value is fetched by the widget on load.

Priority order:

  1. data-theme on the container element (non-auto value)
  2. Theme set in the dashboard for the site
  3. auto (system preference)

When the theme is auto (or not specified), the widget uses a CSS prefers-color-scheme media query to switch between a light and dark appearance automatically. This is the default.

The widget watches the container element for data-theme attribute changes using a MutationObserver. When the attribute changes, the widget updates its appearance immediately — no reload required.

// Toggle theme from your own page code
const container = document.getElementById('comments')
container.dataset.theme = 'dark'

Setting data-theme back to auto (or removing it) causes the widget to fall back to the dashboard-configured theme.

NameDescription
autoFollows system prefers-color-scheme; light by default, dark when the system is in dark mode
lightDefault light appearance (warm off-white background, amber accent)
darkDefault dark appearance (near-black background, amber accent)
catppuccin-latteCatppuccin Latte — light pastel theme with blue accent
catppuccin-frappeCatppuccin Frappé — cool medium-dark theme with lavender accent
catppuccin-macchiatoCatppuccin Macchiato — darker cool theme with blue accent
catppuccin-mochaCatppuccin Mocha — darkest Catppuccin variant with blue accent
draculaDracula — dark purple/grey theme with purple accent
nordNord — cool arctic dark theme with teal accent
gruvbox-lightGruvbox Light — warm retro light theme with orange accent
gruvbox-darkGruvbox Dark — warm retro dark theme with yellow accent
tokyo-nightTokyo Night — deep blue-dark theme with blue accent
rose-pineRosé Pine — dark purple-tinted theme with mauve accent
rose-pine-dawnRosé Pine Dawn — soft warm light theme with purple accent
solarized-lightSolarized Light — classic cream light theme with blue accent
solarized-darkSolarized Dark — classic teal-dark theme with blue accent
one-darkOne Dark — Atom-style dark grey theme with blue accent