styled-components

styled-components breaking-changes badge

styled-components (latest known version: 7.0.0) has 6 known breaking changes on record, each backed by a source URL.

Actively maintainedLatest known version: 7.0.0npm ↗

Recent changes

vstyled-components@7.0.0-prerelease-20260719013821Breaking

Version styled-components@7.0.0-prerelease-20260719013821 is a semver-major release over styled-components@6.4.4-prerelease-20260718230802, but no breaking change was detected in the release notes text - flagged for manual review.

source ↗

v6.0.0Breaking

Version 6.0.0 is a semver-major release over 5.3.11, but no breaking change was detected in the release notes text - flagged for manual review.

source ↗

v5.0.0Breaking

Version 5.0.0 is a semver-major release over 4.4.1, but no breaking change was detected in the release notes text - flagged for manual review.

source ↗

v4.0.0Breaking

- Fix how ampersand is handled in self-referential selector combinations, e.g. `& + &` (see [#2071](https://github.com/styled-components/styled-components/pull/2071)) - Remove deprecated `consolidateStreamedStyles` API, by [@probablyup](https://github.com/probablyup) (see [#1906](https://github.com/styled-components/styled-components/pull/1906)) - Remove deprecated `jsnext:main` entry point from package.json, by [@probablyup](https://github.com/probablyup) (see [#1907](https://github.com/styled-components/styled-components/pull/1907)) - Remove deprecated `.extend` API, by [@probablyup](https://github.com/probablyup) (see [#1908](https://github.com/styled-components/styled-components/pull/1908)) - Migrate to new context API, by [@alexandernanberg](https://github.com/alexandernanberg) (see [#1894](https://github.com/styled-components/styled-components/pull/1894)) - Remove TS typings; they are now to be found in DefinitelyTyped, by [@probablyup](https://github.com/probablyup). See https://github.com/styled-components/styled-components/issues/1778 for more information. - Add new `data-styled-version` attribute to generated `<style>` tags to allow multiple versions of styled-components to function on the page at once without clobbering each other, by [@probablyup](https://github.com/probablyup) It's still highly recommended to use aliasing via your bundler to dedupe libraries like styled-components and react. - [Breaking change] Refactor `keyframes` helper, by [@fer0x](https://github.com/Fer0x) (see [#1930](https://github.com/styled-components/styled-components/pull/1930)). Keyframes is now implemented in a "lazy" manner: its styles will be injected with the render phase of components using them. `keyframes` no longer returns an animation name, instead it returns an object which has method `.getName()` for the purpose of getting the animation name. - Migrate to use new `React.forwardRef` API, by [@probablyup](https://github.com/probablyup); note that this removes the `innerRef` API since it is no longer needed. - Implement `styled()` wrapper folding. In a nutshell, when you nest styled wrappers (e.g. `styled(styled.div)`) the components are now folded such that only one is mounted that contains the merged styles of its ancestors. This is conceptually equivalent to the removed "extend" functionality, but without many of the downsides -- and it's automatic, by [@probablyup](https://github.com/probablyup) (see [#1962](https://github.com/styled-components/styled-components/pull/1962))

source ↗

v3.0.1Breaking

Version 3.0.1 is a semver-major release over 2.4.1, but no breaking change was detected in the release notes text - flagged for manual review.

source ↗

v2.0.0Breaking

Version 2.0.0 is a semver-major release over 1.4.0, but no breaking change was detected in the release notes text - flagged for manual review.

source ↗

Check what changed for styled-components since your installed version, live.

Open the playground →