{"id":20158630,"url":"https://github.com/ahaoboy/r-tui","last_synced_at":"2026-05-05T14:31:14.452Z","repository":{"id":247014906,"uuid":"823146995","full_name":"ahaoboy/r-tui","owner":"ahaoboy","description":"r-tui (react terminal UI)","archived":false,"fork":false,"pushed_at":"2024-10-03T10:12:41.000Z","size":373,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-03T02:21:58.517Z","etag":null,"topics":["js","react","terminal","web"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/ahaoboy.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-07-02T13:42:01.000Z","updated_at":"2024-10-03T10:12:44.000Z","dependencies_parsed_at":"2024-08-15T12:14:07.907Z","dependency_job_id":null,"html_url":"https://github.com/ahaoboy/r-tui","commit_stats":null,"previous_names":["ahaoboy/r-tui"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ahaoboy/r-tui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahaoboy%2Fr-tui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahaoboy%2Fr-tui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahaoboy%2Fr-tui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahaoboy%2Fr-tui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahaoboy","download_url":"https://codeload.github.com/ahaoboy/r-tui/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahaoboy%2Fr-tui/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32653438,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["js","react","terminal","web"],"created_at":"2024-11-13T23:51:31.612Z","updated_at":"2026-05-05T14:31:14.435Z","avatar_url":"https://github.com/ahaoboy.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## r-tui (react terminal UI)\r\n\r\nA simplified version of [ink](https://github.com/vadimdemedes/ink)\r\n\r\n```tsx\r\nexport default function App() {\r\n  return (\r\n    \u003cBox\r\n      width={'100%'}\r\n      height={'100%'}\r\n      display=\"flex\"\r\n      flexDirection=\"row\"\r\n      justifyContent=\"center\"\r\n      alignItems=\"center\"\r\n    \u003e\r\n      \u003cBox color=\"red\" text={'hello'} /\u003e\r\n      \u003cBox color=\"green\" text={'♥'} /\u003e\r\n      \u003cBox color=\"blue\" text={'world'} /\u003e\r\n    \u003c/Box\u003e\r\n  );\r\n}\r\n```\r\n\r\n![flex](./assets/flex.svg)\r\n\r\n## api polyfill\r\n\r\nFor more convenient use, please ensure that the running environment contains at least the following APIs\r\n\r\n### input\r\n\r\n```\r\nprocess.stdin.setRawMode\r\nprocess.stdin.read\r\nprocess.stdin.addListener(\"readable\", cb)\r\nprocess.stdin.addListener(\"data\", cb)\r\nprocess.stdout.rows\r\nprocess.stdout.columns\r\n```\r\n\r\n### output\r\n\r\n```\r\nprocess.stdout.write\r\n```\r\n\r\n## example\r\n\r\n### [cmd](./ui/src/examples/cmd.tsx)\r\n\r\n![cmd](./assets/cmd.gif)\r\n\r\n### [snake](./ui/src/examples/snake.tsx)\r\n\r\n![snake](./assets/snake.gif)\r\n\r\n### [ls](./ui/src/examples/ls.tsx)\r\n\r\n![ls](./assets/ls.gif)\r\n\r\n### [life game](./ui/src/examples/life.tsx)\r\n\r\n![life game](./assets/life.gif)\r\n\r\n## txiki.js\r\n\r\n[r-tui-txiki-react](https://github.com/ahaoboy/r-tui-txiki)\r\n[r-tui-txiki-solidjs](https://github.com/ahaoboy/r-tui-txiki-solidjs)\r\n\r\n### perf\r\n| perf  | size  | time  |\r\n| :---: | :---: | :---: |\r\n| react | 123K  | 40ms  |\r\n| solid |  32K  | 40ms  |\r\n\r\n## todo\r\n\r\n- [ ] support yoga-wasm-web api\r\n- [ ] custom event\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahaoboy%2Fr-tui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahaoboy%2Fr-tui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahaoboy%2Fr-tui/lists"}