Packages

styled-components

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

Your version

4.0.3

30 Oct 2018Where it was published

4.4.1 is the newest release of 4.x.

In short

3 new2 changed

Release note

  • Interpolating a styled component into a string now returns the static component selector (emotion cross-compat)

    import styled from 'styled-components';
    
    const Comp = styled.div`
      color: red;
    `;
    
    `${Comp}`; // .sc-hash
  • Add suppressClassNameWarning prop to disable warning when wrapping a React component with styled() and the className isn't used,

  • Expose ThemeContext to enable static contextType support for React 16.6,

  • Filter out invalid HTML attributes from attrs,

  • Add warning if an attrs prop is a function that returns an element,

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.