styled-components
6.6.0 · 12 Oct 2026MIT14.8M / weekRepositoryHomepagenpmAtom feed
6.6.0 is the newest release of 6.x.
In short
1 faster6 fixed
Release note
Patch Changes
Fix CSS block comments containing
//(e.g. URLs) causing subsequent styles to not be applied.Fix
createGlobalStylestyles not being removed when unmounted in RSC environments. React 19'sprecedenceattribute on style tags makes them persist as permanent resources; global styles now render withoutprecedenceso they follow normal component lifecycle.In RSC environments,
themeis nowundefinedinstead of{}for styled components, matching the existing behavior ofwithThemeandcreateGlobalStyle. This ensures accessing theme properties without a ThemeProvider correctly throws rather than silently returningundefined.Fix
withThemeHOC types: ref now correctly resolves to the component instance type instead of the constructor, andthemeis properly optional in the wrapped component's props.Fix SSR styles hydration and global style cleanup in Shadow DOM
Optimize internal style processing hot paths: cached GroupedTag index lookups, string fast path in flatten, direct string concatenation in dynamic style generation, pre-built stylis middleware chain with lazy RegExp creation, single-lookup Map operations, VirtualTag append fast-path, and manual string concat in SSR output.
Revert
exportsfield and restore browser/server build split withbrowserfield in package.json. Fixesrequire('stream')resolution errors in browser bundlers like webpack 5.
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.