{"id":21605450,"url":"https://github.com/teaguestockwell/react-icon-cloud","last_synced_at":"2025-10-25T16:45:42.413Z","repository":{"id":41067318,"uuid":"401174689","full_name":"teaguestockwell/react-icon-cloud","owner":"teaguestockwell","description":"React component for rendering an interactive img or word cloud on canvas","archived":false,"fork":false,"pushed_at":"2025-01-05T04:13:55.000Z","size":3608,"stargazers_count":85,"open_issues_count":6,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-24T07:03:36.485Z","etag":null,"topics":["canvas","npm","simple-icons","tagcanvas","tagcloud","wordcl"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/teaguestockwell.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-30T00:46:54.000Z","updated_at":"2025-05-20T14:09:06.000Z","dependencies_parsed_at":"2025-02-24T03:21:01.726Z","dependency_job_id":null,"html_url":"https://github.com/teaguestockwell/react-icon-cloud","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/teaguestockwell/react-icon-cloud","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teaguestockwell%2Freact-icon-cloud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teaguestockwell%2Freact-icon-cloud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teaguestockwell%2Freact-icon-cloud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teaguestockwell%2Freact-icon-cloud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teaguestockwell","download_url":"https://codeload.github.com/teaguestockwell/react-icon-cloud/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teaguestockwell%2Freact-icon-cloud/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280987577,"owners_count":26425342,"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-10-25T02:00:06.499Z","response_time":81,"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":["canvas","npm","simple-icons","tagcanvas","tagcloud","wordcl"],"created_at":"2024-11-24T20:13:52.746Z","updated_at":"2025-10-25T16:45:42.361Z","avatar_url":"https://github.com/teaguestockwell.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![license-shield]][license-url] [![linkedin-shield]][linkedin-url] ![size-url] ![size-url2] [![npm-v]][npm-url] [![gh-shield]][gh-url]\n\n[license-shield]: https://img.shields.io/github/license/teaguestockwell/react-icon-cloud.svg\n\n[license-url]: https://github.com/teaguestockwell/react-icon-cloud/blob/master/LICENSE\n\n[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?logo=linkedin\u0026colorB=555\n\n[linkedin-url]: https://www.linkedin.com/in/teague-stockwell/\n\n[size-url]: https://img.shields.io/bundlephobia/minzip/react-icon-cloud\n\n[size-url2]: https://img.shields.io/bundlephobia/min/react-icon-cloud\n\n[npm-v]: https://img.shields.io/npm/v/react-icon-cloud\n\n[npm-url]: https://www.npmjs.com/package/react-icon-cloud\n\n[gh-shield]: https://img.shields.io/badge/-GitHub-black.svg?logo=github\u0026colorB=555\n\n[gh-url]: https://github.com/teaguestockwell/react-icon-cloud\n\n\u003c!-- PROJECT LOGO --\u003e\n\u003cbr /\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/teaguestockwell/react-icon-cloud\"\u003e\n    \u003cimg src=\"https://user-images.githubusercontent.com/71202372/131417256-58058879-f14c-4c03-9bdf-03bd1c80f25d.gif\" alt=\"Logo\" width=\"80%\" \u003e\n  \u003c/a\u003e\n\n  \u003ch3 align=\"center\"\u003eReact Icon Cloud\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n    React component for rendering an interactive img or word cloud on canvas\n    \u003cbr /\u003e\n    \u003ca href=\"https://codesandbox.io/s/react-icon-cloud-1xr9h\"\u003eCode Sandbox\u003c/a\u003e\n    \u003ca href=\"https://github.com/teaguestockwell/react-icon-cloud/issues\"\u003eReport Bug\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/p\u003e\n\n## About\nAn interactive 3D tag cloud component for React that renders text, images, and simple icons into a interactive 3D tag cloud\n\n- Built in support for rendering a cloud of [Simple Icons](https://github.com/simple-icons/simple-icons) with custom fallback color for poor contrast\n\n- Lazy animation of the canvas (pause animation when off screen) \n\n## Getting Started\n\nTo get a local copy up and running follow these simple steps or see the [Code Sandbox](https://codesandbox.io/s/react-icon-cloud-1xr9h).\n\n\n```sh\nnpm i react-icon-cloud\n```\n\n## Static icon slugs\n```tsx\nimport React from 'react'\nimport {Cloud, renderSimpleIcon} from 'react-icon-cloud'\nimport js from \"simple-icons/icons/javascript\"\nimport nextjs from \"simple-icons/icons/nextdotjs\"\n\nconst icons = [js,nextjs].map((icon) =\u003e {\n  return renderSimpleIcon({\n    icon,\n    size: 42,\n    aProps: {\n      onClick: (e: any) =\u003e e.preventDefault()\n    }\n  })\n})\n\nconst IconCloud = () =\u003e {\n  return \u003cCloud\u003e\n    {icons}\n    \u003ca\u003e\n      hello world\n    \u003c/a\u003e\n    \u003ca\n      href=\"https://emojipedia.org/globe-showing-americas/\"\n      target=\"_blank\"\n      rel=\"noopener\"\n    \u003e\n      \u003cimg\n        height=\"42\"\n        width=\"42\"\n        alt=\"A globe\"\n        src=\"https://emojipedia-us.s3.dualstack.us-west-1.amazonaws.com/thumbs/240/apple/285/globe-showing-americas_1f30e.png\"\n      /\u003e\n    \u003c/a\u003e\n  \u003c/Cloud\u003e\n}\n```\n\n## Dynamic icon slugs\n```tsx\nimport React from 'react'\nimport {Cloud, renderSimpleIcon, fetchSimpleIcons, SimpleIcon} from 'react-icon-cloud'\n\nconst useIcons = (slugs: string[]) =\u003e {\n  const [icons, setIcons] = React.useState()\n  React.useEffect(() =\u003e {fetchSimpleIcons({slugs}).then(setIcons)}, [])\n\n  if (icons) {\n    return Object.values(icons.simpleIcons).map((icon) =\u003e renderSimpleIcon({\n      icon,\n      size: 42,\n      aProps: {\n        onClick: (e: any) =\u003e e.preventDefault()\n      }\n    }))\n  }\n  \n  return \u003ca\u003eLoading\u003c/a\u003e\n}\n\nconst slugs = [\n  'amazonaws',\n  'android',\n  'androidstudio',\n  'antdesign',\n  'typescript',\n  'vercel',\n  'visualstudiocode'\n]\n\nconst DynamicIconCloud = () =\u003e {\n  const icons = useIcons(slugs)\n\n  return \u003cCloud\u003e\n    {icons}\n  \u003c/Cloud\u003e\n}\n```\n\n# Props\n## Cloud\n|      name      |                 type                              | default |                           description                           |\n|:--------------:|:-------------------------------------------------:|:-------:|:---------------------------------------------------------------:|\n| canvasProps    | HTMLAttributes \u003c HTMLCanvasElement \u003e \\| undefined | {}      | Attributes that will be passed to the underlying canvas element |\n| children       | Tag[]                                             | []      | Tags rendered using the provided renderers                      |\n| containerProps | HTMLAttributes \u003c HTMLDivElement \u003e  \\| undefined   | {}      | Attributes passed to the root div element                       |\n| id             | string \\| number \\| undefined                                  | uuid    | Should be provided when using SSR                               |\n| options        | IOptions \\| undefined                             | {}      | https://www.goat1000.com/tagcanvas-options.php                  |\n## renderSimpleIcon\nUsed to create a tag for the Cloud component\n|       name       |                       type                      |  default  |                                                                           description                                                                          |\n|:----------------:|:-----------------------------------------------:|:---------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------:|\n| aProps           | HTMLAttributes \u003c HTMLAnchorElement \u003e \\| undefined | {}        | Attributes passed to the underlying anchor element                                                                                                             |\n| bgHex            | string \\| undefined                             | '#fff'    | The string hex of the background the icon will be rendered on. Ex: '#fff'. Used to determine if the min contrast ratio for the icons default color will be met |\n| fallbackHex      | string \\| undefined                             | '#000'    | The color of the icon if the minContrastRatio is not met Ex: '#000'                                                                                            |\n| icon             | any                                             | undefined | The simple icon object you would like to render. Ex: import icon from \"simple-icons/icons/javascript\";\n| imgProps | HTMLAttributes  \u003c HTMLImageElement \u003e \\| undefined | {}      | Attributes passed to the underlying img element    |                                                         |\n| minContrastRatio | number \\| undefined                             | 1         | 0 - 21 The min contrast ratio between icon and bgHex before the fallbackHex will be used for the icon color                                                    |\n| size             | number \\| undefined                             | 42        | The size in px of the icon                                                                                                                                     |\n## fetchSimpleIcons\nUsed when you cant statically import simple icons during build time. Calling this will use `fetch` to get icons for each provided slug.\n|       name       |                       type                      |  default  |                                                                           description                                                                          |\n|:----------------:|:-----------------------------------------------:|:---------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------:|\n| slugs           | string[]                                         |           | Slugs to fetch svgs and colors for. The return icons may be passed to renderSimpleIcon                                                                         |    \n## Examples\n[Tag Canvas Options](https://www.goat1000.com/tagcanvas-options.php)\n\n[Code Sandbox](https://codesandbox.io/s/react-icon-cloud-d0s96s)\n\n[Dynamically Import Icons With Next.js SSR](https://github.com/teaguestockwell/portfolio-v2-nextjs/blob/main/src/components/skill_cloud.tsx)\n## Roadmap\n\nSee the [open issues](https://github.com/tsappdevelopment/react-icon-cloud/issues) for a list of proposed features (and known issues).\n\n## Built With\n\n- [TSdx](https://github.com/formium/tsdx)\n- [TypeScript](https://www.typescriptlang.org)\n- [TagCanvas](https://www.goat1000.com/tagcanvas.php)\n- [Simple Icons](https://github.com/simple-icons/simple-icons)\n\n## License\n\nSee `LICENSE` for more information.\n\n## Contact\n\nTeague Stockwell - [LinkedIn](https://www.linkedin.com/in/teague-stockwell)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteaguestockwell%2Freact-icon-cloud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteaguestockwell%2Freact-icon-cloud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteaguestockwell%2Freact-icon-cloud/lists"}