{"id":15043390,"url":"https://github.com/itsjonq/styled-providers","last_synced_at":"2025-08-27T05:09:27.133Z","repository":{"id":39019059,"uuid":"224014271","full_name":"ItsJonQ/styled-providers","owner":"ItsJonQ","description":"✨ Handy Providers for Emotion / Styled Components","archived":false,"fork":false,"pushed_at":"2023-01-26T15:37:01.000Z","size":1741,"stargazers_count":5,"open_issues_count":26,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-04T07:05:15.306Z","etag":null,"topics":["emotion","providers","react","styled","styled-components"],"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/ItsJonQ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-25T18:23:39.000Z","updated_at":"2020-10-05T12:32:37.000Z","dependencies_parsed_at":"2023-01-28T13:46:38.634Z","dependency_job_id":null,"html_url":"https://github.com/ItsJonQ/styled-providers","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ItsJonQ/styled-providers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsJonQ%2Fstyled-providers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsJonQ%2Fstyled-providers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsJonQ%2Fstyled-providers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsJonQ%2Fstyled-providers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ItsJonQ","download_url":"https://codeload.github.com/ItsJonQ/styled-providers/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsJonQ%2Fstyled-providers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272293881,"owners_count":24908712,"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","status":"online","status_checked_at":"2025-08-27T02:00:09.397Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["emotion","providers","react","styled","styled-components"],"created_at":"2024-09-24T20:48:57.380Z","updated_at":"2025-08-27T05:09:27.086Z","avatar_url":"https://github.com/ItsJonQ.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ✨ Styled Providers\n\n[![Build Status](https://travis-ci.org/ItsJonQ/styled-providers.svg?branch=master)](https://travis-ci.org/ItsJonQ/styled-providers)\n\n\u003e Handy Providers for Emotion / Styled Components\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n-   [Installation](#installation)\n-   [Requirements](#requirements)\n-   [Usage](#usage)\n    -   [Emotion](#emotion)\n    -   [Styled Components](#styled-components)\n-   [Components](#components)\n    -   [FrameProvider](#frameprovider)\n    -   [ScopeProvider](#scopeprovider)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n## Installation\n\n```\nnpm install --save styled-providers\n```\n\n## Requirements\n\n-   [React v16.8.0+](https://reactjs.org/blog/2019/02/06/react-v16.8.0.html)\n-   [Emotion v10+](https://emotion.sh/docs/migrating-to-emotion-10) **or** [Styled Components v5+](https://medium.com/styled-components/announcing-styled-components-v5-beast-mode-389747abd987)\n\n## Usage\n\n[Emotion](https://emotion.sh/) and [Styled Components](https://www.styled-components.com/) are supported.\n\n### Emotion\n\n```jsx\nimport React from \"react\";\nimport styled from \"@emotion/styled\";\nimport { ScopeProvider } from \"styled-providers/emotion\";\n\nconst View = styled.div`\n\tbackground: blue;\n`;\n\nconst App = () =\u003e {\n\treturn (\n\t\t\u003cdiv id=\"#app\"\u003e\n\t\t\t\u003cScopeProvider scope=\"#app\"\u003e\n\t\t\t\t\u003cView /\u003e\n\t\t\t\u003c/ScopeProvider\u003e\n\t\t\u003c/div\u003e\n\t);\n};\n```\n\n### Styled Components\n\n```jsx\nimport React from \"react\";\nimport styled from \"styled-components\";\nimport { ScopeProvider } from \"styled-providers/styled-components\";\n\nconst View = styled.div`\n\tbackground: blue;\n`;\n\nconst App = () =\u003e {\n\treturn (\n\t\t\u003cdiv id=\"#app\"\u003e\n\t\t\t\u003cScopeProvider scope=\"#app\"\u003e\n\t\t\t\t\u003cView /\u003e\n\t\t\t\u003c/ScopeProvider\u003e\n\t\t\u003c/div\u003e\n\t);\n};\n```\n\n## Components\n\n### FrameProvider\n\nProvides the correct document.head to mount the `\u003cstyle\u003e` tag for either Emotion or Styled Components. This is necessary when rendering CSS-in-JS generated styles within elements like iFrames on runtime.\n\n##### Example\n\n```jsx\nimport React from \"react\";\nimport styled from \"@emotion/styled\";\nimport { FrameProvider } from \"styled-providers/emotion\";\nimport Frame from \"react-frame-component\";\n\nconst View = styled.div`\n\tbackground: blue;\n`;\n\nconst App = () =\u003e {\n\treturn (\n\t\t\u003cFrame\u003e\n\t\t\t\u003cFrameProvider\u003e\n\t\t\t\t\u003cView /\u003e\n\t\t\t\u003c/FrameProvider\u003e\n\t\t\u003c/Frame\u003e\n\t);\n};\n```\n\n### ScopeProvider\n\nProvides a scope to prefix before generated classNames for either Emotion or Styled Components. Prefixing increases specificity, allowing for smoother integrations with pre-existing CSS rules.\n\n##### Example\n\n```jsx\nimport React from \"react\";\nimport styled from \"@emotion/styled\";\nimport { ScopeProvider } from \"styled-providers/emotion\";\n\nconst View = styled.div`\n\tbackground: blue;\n`;\n\nconst App = () =\u003e {\n\treturn (\n\t\t\u003cdiv id=\"#app\"\u003e\n\t\t\t\u003cScopeProvider scope=\"html #app\"\u003e\n\t\t\t\t\u003cView /\u003e\n\t\t\t\u003c/ScopeProvider\u003e\n\t\t\u003c/div\u003e\n\t);\n};\n```\n\nIn the above example, rendered selectors (e.g. `.css-123jda`) will be prefixed with `html #app`, resulting in selectors like `html #app .css-123jda`)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsjonq%2Fstyled-providers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitsjonq%2Fstyled-providers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsjonq%2Fstyled-providers/lists"}