Next Themes Versions Save

Perfect Next.js dark mode in 2 lines of code. Support System preference and any other theme with no flashing

v0.3.0

3 months ago

What's

  • "use client" was added to the library output so that you can use it as a React Client component without creating a wrapper.

New Contributors

Full Changelog: https://github.com/pacocoursey/next-themes/compare/v0.2.0...v0.3.0

v0.2.0

2 years ago

Mildly Breaking Changes

These changes shouldn't affect 99% of usage of this library, but they're good to be aware of.

  • Switches from next/script to a regular script tag inserted at the top of the <body>
  • Replaces the base64 encoded script contents with a regular string again

Fixes

  • Fixes a bug with undefined references in the injected script
  • Supports CSP nonce again because the injected script is no longer base64 encdoed
  • Types are once again bundled in the published version
  • Fixes #107
  • Fixes #106
  • Fixes #99
  • Fixes #94
  • Fixes #90