{"id":18530960,"url":"https://github.com/johanbook/react-canvas","last_synced_at":"2026-04-12T16:03:00.688Z","repository":{"id":57121770,"uuid":"307049319","full_name":"johanbook/react-canvas","owner":"johanbook","description":"React component for drawing particles on a canvas","archived":false,"fork":false,"pushed_at":"2020-11-01T09:26:07.000Z","size":252,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-26T19:39:51.314Z","etag":null,"topics":["canvas","react"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johanbook.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-25T07:50:37.000Z","updated_at":"2020-11-01T09:26:09.000Z","dependencies_parsed_at":"2022-08-24T14:57:08.920Z","dependency_job_id":null,"html_url":"https://github.com/johanbook/react-canvas","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johanbook%2Freact-canvas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johanbook%2Freact-canvas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johanbook%2Freact-canvas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johanbook%2Freact-canvas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johanbook","download_url":"https://codeload.github.com/johanbook/react-canvas/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254235701,"owners_count":22036964,"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":["canvas","react"],"created_at":"2024-11-06T18:04:38.082Z","updated_at":"2025-10-18T03:46:32.160Z","avatar_url":"https://github.com/johanbook.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @johanbook/react-canvas\n\n![](https://img.shields.io/travis/johanbook/react-canvas)\n![](https://img.shields.io/npm/v/@johanbook/react-canvas)\n\nThis library aims to make it easier to draw on HTML canvases.\n\n## Install\n\nInstall it using\n\n```sh\nnpm install @johanbook/react-canvas\n```\n\n## Basic usage\n\nWe can create a simple wave as\n\n```jsx\nimport Canvas from \"@johanbook/react-canvas\";\n\nconst NUM = 100;\nconst items = [];\nfor(let idx = 0; idx \u003c NUM; idx++){\n  items.push({x: idx/NUM, y: 0})\n}\n\nconst handleUpdateItem = (item, t) =\u003e {\n  item.y = Math.sin(item.x*8 +t-0.5)/2 + 0.5;\n}\n\nfunction Component() {\n  return (\u003cCanvas\n    items={items}\n    height={100}\n    onUpdateItem={handleUpdateItem}\n  /\u003e);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohanbook%2Freact-canvas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohanbook%2Freact-canvas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohanbook%2Freact-canvas/lists"}