styled-components
6.6.0 · 12 Oct 2026MIT14.8M / weekRepositoryHomepagenpmAtom feed
2.4.1 is the newest release of 2.x.
In short
3 fixed
Release note
This is a big patch release with a bunch of fixes! We're preparing for some big performance improvements in our next minor release, and are working towards stabilising more code to be able to refactor it for v3!
All our documentation is available on our website, as always: styled-components.com
Changed
Added support for webpack nonces
Albeit not the final work on this, we added some initial support webpack nonces. #1022
Added an alias for React Native's ImageBackground component
We added the missing alias for the new ImageBackground component in React Native. Go try it out! #1028
Snapshot testing
We switched more of our tests over to snapshot testing! We hope that this will greatly improve our development speed when implementing new features that only slightly affect our CSS fixtures in our tests.
Be tuned for more!
Fixed
Deterministic ID generation
We previously had no plans for fixing the deterministic ID generation for our new v2 APIs until the new v3 code changes. But since the babel-plugin and SSR have become more important for a huge amount of our users, we now have a fix ready that should support these two methods.
.extend and .withComponent now create new component IDs during the runtime, which are still deterministic. While they're not created during compile time, this is a step towards our good SSR support, which is very important to us.
Misc.
Refactor variable in generateAlphabeticName.js
Fix
.extendnot working after chaining it repeatedly (3 or more inheritances)Fix Flow type signatures for compatibility with Flow v0.47.0
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.