Packages

styled-components

6.6.0 · 12 Oct 2026MIT14.8M / weekRepositoryHomepagenpmAtom feed

Your version

6.0.0

major28 Jun 2023Where it was published

6.6.0 is the newest release of 6.x.

In short

8 breaking1 new1 fixed1 changed1 internal

  • Breaking

    Now using stylis v4 (if using stylis-plugin-rtl you'll need to upgrade to the newer version)

  • Breaking

    styled-components now provides its own types; if you installed @types/styled-components in the past, you'll want to remove it

  • Breaking

    Dropped $as and $forwardedAs props (use as or forwardedAs)

  • Breaking

    Dropped automatic prop filtering; use transient props ($ prefix) for stuff you don't want to be passed to child component / HTML

  • Breaking

    StyleSheetManager: replaced disableVendorPrefixes with enableVendorPrefixes prop

  • Breaking

    StyleSheetManager: dropped automatic vendor prefixing; if you need to support older browsers, you can re-enable it easily with the above prop

  • Breaking

    Dropped deprecated withComponent API (87f511a228e5b13b1ff70a416409e0705e5bf456); use "as" prop instead

  • Breaking

    Node >= 14 needed

Release note

yarn add styled-components

Changed in this version

  • types: Prevent prop bleed on styling properties (fixes #4053, c0f8015)

  • types: Ship csstype via "CSS" namespace

  • Reduced some sources of unnecessary branching logic

Breaking changes in v6

Migration guide → styled-components.com/docs/faqs

  • Breaking

    Now using stylis v4 (if using stylis-plugin-rtl you'll need to upgrade to the newer version)

  • Breaking

    styled-components now provides its own types; if you installed @types/styled-components in the past, you'll want to remove it

  • Breaking

    Dropped $as and $forwardedAs props (use as or forwardedAs)

  • Breaking

    Dropped automatic prop filtering; use transient props ($ prefix) for stuff you don't want to be passed to child component / HTML

  • Breaking

    StyleSheetManager: replaced disableVendorPrefixes with enableVendorPrefixes prop

  • Breaking

    StyleSheetManager: 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>
  • Breaking

    Dropped deprecated withComponent API (87f511a); use "as" prop instead

  • Breaking

    Node >= 14 needed

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.