Skip to content


Choose a tag to compare
@quantizor quantizor released this 28 Jun 01:02
· 81 commits to main since this release
yarn add styled-components

Changed in this version

  • fix(types): prevent prop bleed on styling properties (fixes #4053, c0f8015)
  • feat(types): ship csstype via "CSS" namespace (e6c4f0a)
  • chore: bump stylis to 4.3 (fixes #4007, fa58875)
  • reduced some sources of unnecessary branching logic

Breaking changes in v6

Migration guide 鈫

  • now using stylis v4 (if using stylis-plugin-rtl you'll need to upgrade to the newer version)
  • styled-components now provides its own types; if you installed @types/styled-components in the past, you'll want to remove it
  • dropped $as and $forwardedAs props (use as or forwardedAs)
  • dropped automatic prop filtering; use transient props ($ prefix) for stuff you don't want to be passed to child component / HTML
  • StyleSheetManager
    • replaced disableVendorPrefixes with enableVendorPrefixes prop
    • dropped automatic vendor prefixing; if you need to support older browsers, you can re-enable it easily with the above prop
      <StyleSheetManager enableVendorPrefixes>
        {/* your React tree and ThemeProvider goes here */}
  • dropped deprecated withComponent API (87f511a); use "as" prop instead
  • node >= 14 needed

Full Changelog: v5.3.7...v6.0.0