Skip to content
Devix Open Source

Changelog

Every release of Theme Toggle, newest first. Breaking changes are flagged.

v1.0.0

Breaking 15 Sep 2026

First release.

Added

  • antiFlashScript(), which returns the blocking snippet as a string — 564 bytes, no renderer involved. The two most-reacted open issues on the React alternative, 75 reactions between them, are that script breaking when React renders it; a string has no such problem, and it can be generated at build time and pasted into a template.
  • createTheme(): light, dark, system and any named themes, with the system tracked live and an explicit choice always winning over it.
  • createThemeToggle() as a radiogroup of three — because a two-state switch cannot express "whatever the machine says" — with arrow keys and screen-reader announcements from the browser, or variant: 'button' to cycle, whose label names what it will do next rather than what it is.
  • theme-color support, creating the meta tag if the page has none, so the browser's chrome on a phone follows the theme.
  • Several attributes written at once — ['class', 'data-theme', 'data-bs-theme'] — for a page using more than one design system.
  • color-scheme, so scrollbars, carets, select menus and date pickers follow too.
  • Transitions suppressed for the moment of the switch, with a forced reflow so the rule certainly applies before it is removed.
  • Cross-tab sync through the storage event, and storage access guarded at the property lookup because reading window.localStorage throws in a sandboxed iframe.
  • The choice kept on data-theme-choice separately from the resolved theme, so a stylesheet can tell "system was picked" from "it resolved to dark".
  • React (ThemeToggle and useTheme, with no provider), Vue, Svelte, <dx-theme> and a CDN build.
  • Theming through CSS variables, classNames on every part, your own icons, and a @layer devix stylesheet.
  • 3.2 kB gzip, zero dependencies.