Skip to content

Getting Started

A2UI is a React component catalog that renders A2UI JSON using React Aria Components. Components are distributed shadcn-style. You own the source, you control the styling, and you can customise freely without fighting a library.

Terminal window
# 1. Install the renderer and React Aria
pnpm add @a2ra/core react-aria-components
# 2. Initialise the project config
npx @a2ra/cli init
# 3. Add components (source is copied into your project)
npx @a2ra/cli add button text-field form
import { A2Renderer, defaultRegistry } from "@a2ra/core"
const node = {
type: "Form",
children: [
{ type: "TextField", props: { label: "Email", isRequired: true } },
{ type: "Button", props: { variant: "primary", children: "Submit" } },
],
}
export function MyApp() {
return <A2Renderer node={node} registry={defaultRegistry} />
}

defaultRegistry includes all 18 built-in components. For a leaner bundle in production, create a custom registry with only the components you use.