npm install. Only major versions have the potential to introduce breaking changes (noted in the following release notes).DefaultTheme type definitionExoticComponentWithDisplayName API from React.Full Changelog: https://github.com/styled-components/styled-components/compare/v6.1.12...v6.1.13
Full Changelog: https://github.com/styled-components/styled-components/compare/v6.1.11...v6.1.12
Full Changelog: https://github.com/styled-components/styled-components/compare/v6.1.10...v6.1.11
Full Changelog: https://github.com/styled-components/styled-components/compare/v6.1.9...v6.1.10
Full Changelog: https://github.com/styled-components/styled-components/compare/v6.1.8...v6.1.9
Revert adding peerDependencies from v6.1.7; apparently some package managers have differing behaviors around peerDependenciesMeta[package].optional which is causing issues. Will revisit at a later date if possible.
Full Changelog: https://github.com/styled-components/styled-components/compare/v6.1.7...v6.1.8
chore: add all missing peer dependency statements by @quantizor in https://github.com/styled-components/styled-components/pull/4243
NOTE: this change may cause some installed dependency duplication until this NPM bug is addressed but yarn and pnpm have correct behavior. Bun also has a similar bug.
Overall these changes ensure that styled-components is specifying a known working version of all utilized libraries, while instructing the client package manager that higher semver-compliant versions are permissible and should work, assuming the relevant libraries are compliant in practice.
Full Changelog: https://github.com/styled-components/styled-components/compare/v6.1.6...v6.1.7
Full Changelog: https://github.com/styled-components/styled-components/compare/v6.1.5...v6.1.6
Full Changelog: https://github.com/styled-components/styled-components/compare/v6.1.4...v6.1.5
attrs to provide a custom theme prop to child components by @quantizor in https://github.com/styled-components/styled-components/pull/4242Full Changelog: https://github.com/styled-components/styled-components/compare/v6.1.3...v6.1.4
Full Changelog: https://github.com/styled-components/styled-components/compare/v6.1.2...v6.1.3
Full Changelog: https://github.com/styled-components/styled-components/compare/v6.1.1...v6.1.2
Full Changelog: https://github.com/styled-components/styled-components/compare/v6.1.0...v6.1.1
Full Changelog: https://github.com/styled-components/styled-components/compare/v6.0.9...v6.1.0
fix bundling to not hardcode window (should fix some testing use cases that were incorrectly assuming a server environment when JSDOM and similar are in use)
Full Changelog: https://github.com/styled-components/styled-components/compare/v6.0.8...v6.0.9
toStyleSheet function by @krudos in https://github.com/styled-components/styled-components/pull/4124StyleSheetManager updating context on every render by @keeganstreet in https://github.com/styled-components/styled-components/pull/4159JSX.IntrinsicElements for the supported element list by @RJWadley in https://github.com/styled-components/styled-components/pull/4149StyleFunction, Interpolation by @bcole808 in https://github.com/styled-components/styled-components/pull/4140CSSProperties, CSSObject, CSSPseudos and CSSKeyframes by @takurinton in https://github.com/styled-components/styled-components/pull/4117Full Changelog: https://github.com/styled-components/styled-components/compare/v6.0.7...v6.0.8
exactOptionalPropertyTypes check by @aspirisen in https://github.com/styled-components/styled-components/pull/3993Full Changelog: https://github.com/styled-components/styled-components/compare/v6.0.6...v6.0.7
Full Changelog: https://github.com/styled-components/styled-components/compare/v6.0.5...v6.0.6
Full Changelog: https://github.com/styled-components/styled-components/compare/v6.0.4...v6.0.5
Full Changelog: https://github.com/styled-components/styled-components/compare/v6.0.3...v6.0.4
Full Changelog: https://github.com/styled-components/styled-components/compare/v6.0.2...v6.0.3
displayName in production to save bytes, it's already present in the static className if you're using the babel plugin or equivalentflatMap and at with ES5-compliant variantsFull Changelog: https://github.com/styled-components/styled-components/compare/v6.0.1...v6.0.2
Fixed an issue where a dev-time warning was being triggered too eagerly.
Full Changelog: https://github.com/styled-components/styled-components/compare/v6.0.0...v6.0.1
yarn add styled-componentsMigration guide → https://styled-components.com/docs/faqs#what-do-i-need-to-do-to-migrate-to-v6
stylis v4 (if using stylis-plugin-rtl you'll need to upgrade to the newer version)@types/styled-components in the past, you'll want to remove it$as and $forwardedAs props (use as or forwardedAs)$ prefix) for stuff you don't want to be passed to child component / HTMLStyleSheetManager
disableVendorPrefixes with enableVendorPrefixes proptsx
<StyleSheetManager enableVendorPrefixes>
{/* your React tree and ThemeProvider goes here */}
</StyleSheetManager>withComponent API (87f511a228e5b13b1ff70a416409e0705e5bf456); use "as" prop insteadFull Changelog: https://github.com/styled-components/styled-components/compare/v5.3.7...v6.0.0