a streamlined CSS-in-JS solution tailor-made for Next.js, seamlessly combining the expressive power of styled-components syntax with efficient build-time extraction and minimal runtime footprint, ensuring optimal performance and easy integration with existing atomic CSS frameworks like Tailwind CSS
next-yak automatically uses css modules behind the scenes and in nextjs css modules are local by default.
this means that selectors e.g. html.dark-mode will be scoped automatically to the component
next-yak automatically uses css modules behind the scenes and in nextjs css modules are local by default. this means that selectors e.g.
html.dark-mode
will be scoped automatically to the componentfor example
becomes
so although the user wrote
html.dark-mode
it would NOT match.as this is unintuitive for most users and therefore next-yak should automatically inject
:global