{"id":28074243,"url":"https://github.com/vdmrgv/emotion-styled-components","last_synced_at":"2026-05-15T22:32:39.523Z","repository":{"id":207936697,"uuid":"720383080","full_name":"vdmrgv/emotion-styled-components","owner":"vdmrgv","description":"💅 A styled function with automatic filtering of non-standard attributes for your components.","archived":false,"fork":false,"pushed_at":"2023-11-19T10:17:23.000Z","size":134,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-04T05:06:23.579Z","etag":null,"topics":["css-in-js","emotion","props","react","should-forward-prop","styled","styles"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vdmrgv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-11-18T10:11:06.000Z","updated_at":"2023-11-20T20:02:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"2e894a97-d94b-4cba-92cc-810565c7e2d6","html_url":"https://github.com/vdmrgv/emotion-styled-components","commit_stats":null,"previous_names":["vdmrgv/emotion-styled-components"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/vdmrgv/emotion-styled-components","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vdmrgv%2Femotion-styled-components","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vdmrgv%2Femotion-styled-components/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vdmrgv%2Femotion-styled-components/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vdmrgv%2Femotion-styled-components/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vdmrgv","download_url":"https://codeload.github.com/vdmrgv/emotion-styled-components/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vdmrgv%2Femotion-styled-components/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262753041,"owners_count":23358880,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["css-in-js","emotion","props","react","should-forward-prop","styled","styles"],"created_at":"2025-05-12T23:32:25.130Z","updated_at":"2025-10-04T13:32:38.459Z","avatar_url":"https://github.com/vdmrgv.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# emotion-styled-components\n\n[![Version Badge][npm-version-svg]][package-url]\n[![GZipped size][npm-minzip-svg]][bundlephobia-url]\n[![Downloads][downloads-image]][downloads-url]\n[![NPM total downloads][total-downloads-svg]][total-downloads-url]\n\nA `styled` function with automatic filtering of non-standard attributes base on `@emotion/styled` package.\u003cbr /\u003e\n\n### Motivation\n\n`emotion-styled-components` is the result of thinking about how we can improve prop forwarding for the `@emotion/styled` system. In one of our past projects, we used the `styled-components` system where props forwarding was provided out of the box, but when we switched to `@emotion/styled` we ran into a problem where some components were generating warnings: `Invalid attribute name` then we tried to solve this problem. By focusing on the `styled-components` use case, we were able to solve this problem.\n\n## Installation\n\nTo use this package you must have installed [emotion](https://emotion.sh/docs/install) package\n\n```bash\n  # with npm\n  npm install --save emotion-styled-components @emotion/styled\n```\n\n```bash\n  # with yarn\n  yarn add emotion-styled-components @emotion/styled\n```\n\n## Simple Example\n\nIf the styled target is a simple element (e.g. `styled.div`), styled-components passes through any known HTML attribute to the DOM. If it is a custom React component (e.g. `styled(MyComponent)`), styled-components passes through all props.\n\nThis example shows how all props of the `Button` component are passed on to the DOM node that is mounted, as with React elements.\n\n```js\nimport styled from 'emotion-styled-components';\nimport MyButton from '@my-ui-components';\n\nconst Button = styled(MyButton)\u003c{ $primary?: boolean; }\u003e`\n  background: ${props =\u003e props.$primary ? \"#BF4F74\" : \"white\"};\n  color: ${props =\u003e props.$primary ? \"white\" : \"#BF4F74\"};\n`;\n\nrender(\n  \u003cdiv\u003e\n    \u003cButton type=\"button\"\u003eNormal\u003c/Button\u003e\n    \u003cButton $primary type=\"submit\"\u003ePrimary\u003c/Button\u003e\n  \u003c/div\u003e\n);\n```\n\n\u003e Note how the `$primary` prop is not passed to the DOM, but `type` are? The styled function is smart enough to filter non-standard attributes automatically for you.\n\nIt also supports all functions coming from [emotion](https://emotion.sh/docs/styled) by default.\n\n## Arguments\n\nSee more on [emotion](https://emotion.sh/docs/styled).\n\n## Contributing\n\nPlease read through our [contributing guidelines](https://github.com/vdmrgv/emotion-styled-components/blob/main/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development.\n\n## License\n\nCode released under the [MIT License][license-url].\n\n[package-url]: https://npmjs.org/package/emotion-styled-components\n[npm-version-svg]: https://img.shields.io/npm/v/emotion-styled-components.svg\n[npm-minzip-svg]: https://img.shields.io/bundlephobia/minzip/emotion-styled-components.svg\n[bundlephobia-url]: https://bundlephobia.com/result?p=emotion-styled-components\n[license-url]: LICENSE\n[downloads-image]: http://img.shields.io/npm/dm/emotion-styled-components.svg\n[downloads-url]: http://npm-stat.com/charts.html?package=emotion-styled-components\n[total-downloads-svg]: https://img.shields.io/npm/dt/emotion-styled-components.svg?style=flat\n[total-downloads-url]: https://npmcharts.com/compare/emotion-styled-components?minimal=true\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvdmrgv%2Femotion-styled-components","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvdmrgv%2Femotion-styled-components","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvdmrgv%2Femotion-styled-components/lists"}