Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress 💅
toStyleSheet
function by @krudos in https://github.com/styled-components/styled-components/pull/4124
StyleSheetManager
updating context on every render by @keeganstreet in https://github.com/styled-components/styled-components/pull/4159
JSX.IntrinsicElements
for the supported element list by @RJWadley in https://github.com/styled-components/styled-components/pull/4149
StyleFunction
, Interpolation
by @bcole808 in https://github.com/styled-components/styled-components/pull/4140
CSSProperties
, CSSObject
, CSSPseudos
and CSSKeyframes
by @takurinton in https://github.com/styled-components/styled-components/pull/4117
Full 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/3993
Full 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-components
Migration 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
prop<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
yarn add styled-components
Migration 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
prop<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/v6.0.0-rc.5..v6.0.0-rc.6