{"id":31939646,"url":"https://github.com/alibaba/canvas-ui","last_synced_at":"2025-10-14T08:44:33.531Z","repository":{"id":41902608,"uuid":"440137407","full_name":"alibaba/canvas-ui","owner":"alibaba","description":"UI Renderer runs on top of the HTML5 Canvas","archived":false,"fork":false,"pushed_at":"2025-10-09T14:15:05.000Z","size":6510,"stargazers_count":185,"open_issues_count":2,"forks_count":20,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-10-10T21:10:01.917Z","etag":null,"topics":["canvas","react","typescript"],"latest_commit_sha":null,"homepage":"https://alibaba.github.io/canvas-ui/","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/alibaba.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-12-20T10:57:34.000Z","updated_at":"2025-10-09T14:15:10.000Z","dependencies_parsed_at":"2024-11-19T04:01:43.656Z","dependency_job_id":null,"html_url":"https://github.com/alibaba/canvas-ui","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/alibaba/canvas-ui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alibaba%2Fcanvas-ui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alibaba%2Fcanvas-ui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alibaba%2Fcanvas-ui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alibaba%2Fcanvas-ui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alibaba","download_url":"https://codeload.github.com/alibaba/canvas-ui/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alibaba%2Fcanvas-ui/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018302,"owners_count":26086345,"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-14T02:00:06.444Z","response_time":60,"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","react","typescript"],"created_at":"2025-10-14T08:44:32.335Z","updated_at":"2025-10-14T08:44:33.523Z","avatar_url":"https://github.com/alibaba.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg width=\"248\" alt=\"canvas-ui-logo\" src=\"https://user-images.githubusercontent.com/180445/147241118-4fb09f35-8bc0-449b-8ab1-045caa9eb726.png\"\u003e\n\nCanvas UI is a general UI renderer runs on HTML Canvas. https://alibaba.github.io/canvas-ui/\n\n\u003chr\u003e\n\nIt provides a series of React components, allowing developers to quickly build Canvas-based applications using their existing knowledge.\n\nIt also features a DOM-like scene tree, enabling developers to manipulate elements drawn in Canvas just like they would manipulate DOM elements.\n\n```tsx\nimport React from 'react'\nimport { Canvas, Text, Flex } from '@canvas-ui/react'\n\nexport default () =\u003e {\n  const containerStyle = {\n    width: 250,\n    flexDirection: 'column'\n  }\n  const textStyle = {\n    maxWidth: containerStyle.width,\n    maxLines: 1,\n  }\n  return (\n    \u003cdiv style={{ height: '100px' }}\u003e\n      \u003cCanvas\u003e\n        \u003cFlex style={ containerStyle }\u003e\n          \u003cText style={ textStyle }\u003e私はガラスを食べられます。それは私を傷つけません。\u003c/Text\u003e\n          \u003cText style={ textStyle }\u003eThe quick brown fox jumps over the lazy dog.\u003c/Text\u003e\n        \u003c/Flex\u003e\n      \u003c/Canvas\u003e\n    \u003c/div\u003e\n  )\n}\n```\n\n# Demo\n\nhttps://stackblitz.com/github/alibaba/canvas-ui/tree/main/examples/kanban\n\n![canvas-ui-kanban-demo](https://alibaba.github.io/canvas-ui/assets/images/stackblitz-aa46daf95c93384d7fee39a81805f909.png)\n\n\n# Features\n\n- Manipulate elements in Canvas just like DOM elements\n\n- Seamlessly integrating with React applications\n\n- Flex layout\n\n- Animation based on [motion](https://motion.dev/)\n\n- Basic text typography capabilities: automatic word wrapping, alignment, text overflow\n\n- CSS styles through the style attribute\n\n- Interaction events: PointerEvents and WheelEvent\n\n- Convenient layering capabilities\n\n- Fully written in TypeScript with complete type definitions\n\n- Rendering in WebWorker (WIP)\n\n# Project Structure\n\n- packages/core\nThe core of the renderer, providing capabilities such as createElement, events, rendering pipeline, etc.\n\n- packages/react\nCanvas UI's official React binding, providing components like `\u003cView /\u003e`, `\u003cText /\u003e`, etc.\n\n- packages/examples\nComponent development and testing environment based on Storybook\n\n- tools/\nscripts\n\n# Development\n\n```\n# Start development mode for core and react\n$ pnpm dev\n\n# Start Storybook\n$ pnpm dev:storybook\n\n# Run unit tests\n$ pnpm test\n\n# Build umd, esm versions\n$ pnpm build\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falibaba%2Fcanvas-ui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falibaba%2Fcanvas-ui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falibaba%2Fcanvas-ui/lists"}