{"id":51331018,"url":"https://github.com/roonga/a2-react-aria","last_synced_at":"2026-07-01T23:01:38.588Z","repository":{"id":364161542,"uuid":"1266671275","full_name":"roonga/a2-react-aria","owner":"roonga","description":"A2UI JSON to accessible React components for AI-native apps. Agents emit structured JSON; A2Renderer validates and renders it. Own your source shadcn-style.","archived":false,"fork":false,"pushed_at":"2026-06-27T00:06:07.000Z","size":1225,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-27T00:07:39.655Z","etag":null,"topics":["a11y","accessibility","ag-ui","ai","ai-agents","copilotkit","react","react-aria","schema-validation","shadcn-style","typescript"],"latest_commit_sha":null,"homepage":"https://roonga.github.io/a2-react-aria/","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/roonga.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-06-11T21:02:31.000Z","updated_at":"2026-06-26T22:42:39.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/roonga/a2-react-aria","commit_stats":null,"previous_names":["roonga/a2-react-aria"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/roonga/a2-react-aria","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roonga%2Fa2-react-aria","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roonga%2Fa2-react-aria/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roonga%2Fa2-react-aria/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roonga%2Fa2-react-aria/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roonga","download_url":"https://codeload.github.com/roonga/a2-react-aria/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roonga%2Fa2-react-aria/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35025983,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-01T02:00:05.325Z","response_time":130,"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":["a11y","accessibility","ag-ui","ai","ai-agents","copilotkit","react","react-aria","schema-validation","shadcn-style","typescript"],"created_at":"2026-07-01T23:01:14.571Z","updated_at":"2026-07-01T23:01:38.581Z","avatar_url":"https://github.com/roonga.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# a2-react-aria\n\nA React component catalog that renders **a2UI JSON** using **React Aria Components**.\nDesigned for AI-native applications — agents emit a2UI JSON, `A2Renderer` turns it into\naccessible, production-ready UI.\n\nComponents are distributed **shadcn-style**: consumers own the source via\n`npx @a2ra/cli add \u003ccomponent\u003e`. No fighting library internals. Restyle freely.\n\n## How it works\n\n```text\nAI Agent (LangGraph, Google ADK, CrewAI, etc.)\n   │  emits: { \"type\": \"Form\", \"props\": { ... }, \"children\": [...] }\n   │  via AG-UI protocol or CopilotKit\n   ▼\n\u003cA2Renderer node={payload} /\u003e\n   │  validates with Zod · resolves component from registry\n   ▼\nAccessible React Aria Component\n   (source lives in your project — you own it)\n```\n\n## Packages\n\n| Package | Description |\n|---|---|\n| `@a2ra/core` | `A2Renderer`, component registry, Zod schemas |\n| `@a2ra/cli` | CLI — `init`, `list`, `add`, `diff` components from the registry |\n| `@a2ra/vscode` | VS Code extension — IntelliSense, live preview, CLI integration _(planned)_ |\n\n## Quick start\n\n```bash\n# 1. install the renderer + React Aria\npnpm add @a2ra/core react-aria-components\n\n# 2. create an a2ra.json config (sets your components directory)\nnpx @a2ra/cli init\n\n# 3. add components à la carte — the source is copied into your project, you own it\nnpx @a2ra/cli add button\nnpx @a2ra/cli add text-field form dialog\n```\n\nThe CLI copies each component's source (component, styles, schema, barrel) into the directory\nconfigured in `a2ra.json` (default `components/a2ui/`) and prints the npm dependencies to install.\n\n## CLI\n\n| Command | Description |\n|---|---|\n| `a2ra init` | Create `a2ra.json` (sets `componentsDir` and optional registry override) |\n| `a2ra list` | List the components available in the registry |\n| `a2ra add \u003ccomponent...\u003e` | Copy one or more components into your project |\n| `a2ra diff [component]` | Compare installed components against the registry |\n\nUseful flags: `--dir \u003cpath\u003e` (override target directory), `--overwrite` (replace existing files),\n`--registry \u003curl-or-path\u003e` (use an alternative or local registry). The registry location also\nhonours the `A2RA_REGISTRY` environment variable.\n\n```tsx\nimport { A2Renderer, defaultRegistry } from \"@a2ra/core\"\n\nconst node = {\n  type: \"Form\",\n  children: [\n    { type: \"TextField\", props: { label: \"Email\" } },\n    { type: \"Button\", props: { variant: \"primary\", children: \"Submit\" } },\n  ],\n}\n\nexport default function App() {\n  return \u003cA2Renderer node={node} registry={defaultRegistry} /\u003e\n}\n```\n\n`defaultRegistry` includes every built-in component. For production apps where you've added components\nvia the CLI and want a leaner bundle, pass a custom registry instead:\n\n```tsx\nimport { A2Renderer, createRegistry } from \"@a2ra/core\"\nimport { Form } from \"./components/a2ui/form\"\nimport { TextField } from \"./components/a2ui/text-field\"\nimport { Button } from \"./components/a2ui/button\"\n\nconst registry = createRegistry({\n  Form: { component: Form },\n  TextField: { component: TextField },\n  Button: { component: Button },\n})\n\nexport default function App() {\n  return \u003cA2Renderer node={node} registry={registry} /\u003e\n}\n```\n\n## AI agent integration\n\na2UI JSON is the portable, schema-validated alternative to returning raw JSX from agents.\n\n- **AG-UI protocol** — emit a2UI JSON as a `generative_ui` event over SSE or WebSocket\n- **CopilotKit** — use `useCopilotAction` to pass agent payloads directly to `\u003cA2Renderer\u003e`\n- **Any agent framework** — LangGraph, Google ADK, CrewAI, Pydantic AI, AWS Strands, and more\n\n## Development\n\n```bash\npnpm install\npnpm build       # build all packages\npnpm test        # Vitest\npnpm lint        # Biome\npnpm storybook   # component explorer on :6006\n```\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for how to get started, branch and commit conventions,\nand the component authoring workflow.\n\n## License\n\n[MIT](LICENSE) — [Ravi Mohan](https://github.com/roonga)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froonga%2Fa2-react-aria","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froonga%2Fa2-react-aria","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froonga%2Fa2-react-aria/lists"}