@wrksz/themes

Modern theme management for Next.js 16+ and React 19+. Every bug fixed. Every missing feature added.

Zero dependenciesReact 19 readyTypeScript

Features

Everything next-themes should have been

React 19 ready

Fixes the inline script warning, Activity/cacheComponents stale theme, and the __name minification bug.

Drop-in replacement

Same API as next-themes. Swap the import and you are done. No migration needed.

Hybrid storage

Use storage="hybrid" for cookie-first SSR correctness plus cross-tab sync via localStorage.

Nested providers

Independent theme instances per section. Each provider manages its own state with a per-instance store.

Full type safety

createThemes(...) infers your theme union once and types useTheme, useThemeValue, and setTheme everywhere.

Zero runtime deps

No runtime dependencies. Ships only what the browser needs: a tiny inline script and React hooks.

Comparison

Why not next-themes?

43 open issues, 16 open PRs, React 19 bugs unresolved.

React 19 script warningFixed
__name minification bugFixed
React 19 Activity / cacheComponents stale themeFixed
Multiple classes per themeFixed
Nested providersYes
sessionStorage supportYes
cookie storage (zero-flash SSR)Yes
Disable storageYes
meta theme-color supportYes
Server-provided themeYes
Always follow system preferenceYes
disableTransitionOnChange per propertyYes
Read theme outside ReactYes
Generic typesYes
Zero runtime dependenciesYes

What's next

Actively developed and growing

Framework agnostic

Remix, Vite, SvelteKit, and any React-based framework. Not just Next.js.

More features

New APIs, more storage adapters, and deeper control over theme resolution.

Open to contributions

Bug reports, feature requests, and PRs are welcome on GitHub.