npm styled-components 6.0.0-rc.6
v6.0.0-rc.6

latest releases: 6.1.13, 6.1.12, 6.1.11...
17 months ago
yarn add styled-components

Changed in this version

  • fix: stylis types are now included as a direct dependency #4051 (235a62b)
  • refactor: simplify code related to style tag injection #4040 (c3939a4)
  • chore: don't warn if shouldForwardProp is in use and the prop is forwarded (00ab9c4)

Breaking changes in v6

Migration guide → https://styled-components.com/docs/faqs#what-do-i-need-to-do-to-migrate-to-v6

  • 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 */}
      </StyleSheetManager>
  • dropped deprecated withComponent API (87f511a); use "as" prop instead
  • node >= 14 needed

Full Changelog: https://github.com/styled-components/styled-components/compare/v6.0.0-rc.5..v6.0.0-rc.6

Don't miss a new styled-components release

NewReleases is sending notifications on new releases.