v1.0.0
Breaking 15 Sep 2026First 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 aradiogroupof three — because a two-state switch cannot express "whatever the machine says" — with arrow keys and screen-reader announcements from the browser, orvariant: 'button'to cycle, whose label names what it will do next rather than what it is.theme-colorsupport, 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
storageevent, and storage access guarded at the property lookup because readingwindow.localStoragethrows in a sandboxed iframe. - The choice kept on
data-theme-choiceseparately from the resolved theme, so a stylesheet can tell "system was picked" from "it resolved to dark". - React (
ThemeToggleanduseTheme, with no provider), Vue, Svelte,<dx-theme>and a CDN build. - Theming through CSS variables,
classNameson every part, your ownicons, and a@layer devixstylesheet. - 3.2 kB gzip, zero dependencies.