{"full_name":"styled-components/styled-components","owner":"styled-components","name":"styled-components","url":"https://github.com/styled-components/styled-components","description":"Fast, expressive styling for React. Server components, client components, streaming SSR, React Native—one API.","homepage":"https://styled-components.com","topics":[],"language":"TypeScript","license":"MIT","avatar":"https://avatars.githubusercontent.com/u/20658825?v=4","created_at":"2016-08-16T06:41:32Z","pushed_at":"2026-11-10T05:33:19Z","metrics":{"stars":41048,"forks":2606,"watchers":367,"issues":3027,"prs":1525,"releases":268,"issues_open":null,"issues_closed":null,"prs_open":null,"prs_closed":null,"prs_merged":null,"discussions":93},"growth":{"day":{"stars":0,"forks":-1,"base_day":"2026-11-09"}},"history":{"dates":["2026-11-09","2026-11-10"],"stars":[41048,41048],"forks":[2607,2606],"watchers":[367,367],"issues_open":[null,null],"prs_open":[null,null]},"boards":{},"same_owner":[],"issues":[{"number":5767,"title":"6.4.3: `PolymorphicCallProps` rewrite causes 57× more `ComponentPropsWithRef` instantiations, +1.6 GB tsc heap in our app","comments":10,"created_at":"2026-07-02T16:27:51Z"},{"number":5808,"title":"inline <style> tags get removed by <Suspense> streaming, making styles disappear","comments":7,"created_at":"2026-09-03T14:24:14Z"},{"number":4350,"title":"OOM during typecheking in 6.1.13","comments":7,"created_at":"2024-09-09T09:11:24Z"},{"number":5838,"title":"stylisPluginRSC not working on Nextjs navigations","comments":5,"created_at":"2026-10-16T09:20:05Z"},{"number":4305,"title":"Regression: `typeof` on a styled component returns incompatible type","comments":5,"created_at":"2024-05-07T09:23:01Z"},{"number":5788,"title":"[6.4.x / 6.5.0] Rules of Hooks violation in dev mode when styled component re-renders with unchanged style props (regression from 6.4.0)","comments":4,"created_at":"2026-08-06T09:33:46Z"},{"number":5737,"title":"SSR hydration mismatch (all class names differ between server and client) introduced in 6.3.12 with webpack + nodeExternals","comments":3,"created_at":"2026-04-30T10:21:14Z"},{"number":5613,"title":"Line comments are not supported in multiline style declarations","comments":3,"created_at":"2025-10-21T13:38:53Z"}],"discussions":[{"number":5673,"title":"Any interest in integrating WyW-in-JS for a zero runtime option?","comments":0,"category":"General","created_at":"2026-02-21T22:07:07Z"},{"number":5657,"title":"Is styled-components in maintenance mode?","comments":1,"category":"General","created_at":"2026-02-02T08:40:31Z"},{"number":5619,"title":"New Philosofy","comments":0,"category":"General","created_at":"2025-12-19T10:20:23Z"},{"number":5568,"title":"Library entering maintenance mode","comments":1,"category":"General","created_at":"2025-03-23T16:56:09Z"},{"number":5515,"title":"Integration with tailwindcss?","comments":1,"category":"Q&A","created_at":"2025-01-01T15:27:45Z"},{"number":4366,"title":"React 16 compatibility with styled-components","comments":0,"category":"General","created_at":"2024-11-01T07:12:24Z"},{"number":4344,"title":"Is this good approach? -- <style>{` ${Comp} {....} `}</style>","comments":0,"category":"General","created_at":"2024-08-23T07:55:41Z"},{"number":4330,"title":"Is there any update roadmap?","comments":1,"category":"Q&A","created_at":"2024-07-05T07:39:53Z"}],"latest_release":{"name":"styled-components@6.6.0","tag":"styled-components@6.6.0","published_at":"2026-10-12T19:01:04Z","body":"### Minor Changes\n\n- 7ce6aea: Added a `StyledComponent<Target, Props>` type for annotating explicitly-typed styled component exports.\n\n  Packages that emit their own declaration files, including any project using `isolatedDeclarations`, must annotate every exported styled component, and there was no public type for it: consumers reached into internal paths or hand-assembled one that dropped members like a wrapped component's hoisted statics.\n\n  `StyledComponent` is exported from the web and native entries. Name the target and props as you passed them to `styled`:\n\n  ```tsx\n  import styled, { type StyledComponent } from 'styled-components';\n\n  export const Card: StyledComponent<'div', { $active?: boolean }> = styled.div<{\n    $active?: boolean;\n  }>`...`;\n  export const CloseButton: StyledComponent<typeof IconButton> = styled(IconButton)`...`;\n  ```\n\n  It resolves to the exact type `styled(Target)<Props>` produces, so the annotation is not lossy.\n\n### Patch Changes\n\n- 7afbd11: Fixed `attrs` no longer applying its value when a prop was explicitly passed as `undefined` (the 6.3.12 to 6.5.x behavior). `styled.button.attrs(({ type = 'button', ...rest }) => ({ type, ...rest }))` rendered without `type=\"button\"` when the caller passed `type={undefined}`, and an object-form default such as `.attrs({ type: 'button' })` was lost the same way, including through a wrapper component that spreads its own props over the styled component. `attrs` now always wins for the keys it returns, matching every other case where a prop is passed alongside `attrs`.\n\n  Also fixed: a prop passed explicitly as `undefined` (and not overridden by `attrs`) is now forwarded to a wrapped component so that component can fall back to its own default, the pattern MUI's `ButtonBase` relies on (for example `<Root role=\"button\" {...props} />`). Wrapped components have dropped this prop entirely since v6.0, so a component that checks `'role' in props` or merges `{...defaults, ...props}` to detect an explicitly-passed prop may see and behave differently now that the key is present again. This only applies when wrapping another component; a DOM tag such as `styled.div` still drops the `undefined` prop entirely, since browsers have no notion of an \"undefined\" attribute.\n\n  If you were relying on an explicit `undefined` to clear an `attrs` default, use the function form and check for the prop's presence instead:\n\n  ```js\n  styled.a.attrs(props => ('rel' in props ? {} : { rel: 'noopener' }))``;\n  ```\n\n  Passing `rel={undefined}` now renders no `rel` attribute, and omitting the prop renders `rel=\"noopener\"`.\n\n  React Native already forwarded an explicit `undefined` prop to a wrapped component; it now also matches web in never forwarding an `undefined` that `attrs` itself produced.\n\n- 209317c: Rendering styled-components on the server with the edge runtime (for example `export const runtime = 'edge'` in a Next.js route) now fails with a clear message that names the fix: use the Node.js runtime for routes that render styled-components. Previously the same setup ended in an obscure crash, either at `next build` or on the first request.\n- 3de03c2: Type-checking is faster when you annotate exported styled components with an explicit type, the pattern that packages emitting their own declaration files (including any project using `isolatedDeclarations`) rely on. The improvement is largest in codebases that annotate many components built on intrinsic tags such as `styled.div`, `styled.span`, and `styled.button`, and wrappers over polymorphic components whose props are a union.\n\n  Nothing about the styled component's type changes for your code: props, `defaultProps`, `propTypes`, ref forwarding, and `as` polymorphism all behave exactly as before. This is purely a type-check speedup.\n\n- 7afbd11: Fixed a typo in the `useTheme` error message's example code (a misspelled component name in error 18), so the copy-pasted example compiles as written.\n- 7afbd11: Fixed global styles from `cre"},"readme":true,"readme_zh":false,"news":[],"stale":false,"snapshot_at":"2026-11-10T09:35:25Z","history_start":"2026-09-06"}