Component Catalog
The built-in A2UI catalog provides 18 Angular components covering display, layout, interactive controls, media, and advanced inputs. Pass a2uiBasicCatalog() to the ChatComponent views input to enable A2UI rendering, or instantiate it directly for custom setups.
Import:
#Signature
Returns a ViewRegistry mapping 18 A2UI type names to their Angular component implementations. Pass the result to A2uiSurfaceComponent or use it as a starting point for a custom registry.
#Display Components
#Text
Renders a span of text.
| A2UI type | Angular component | Selector |
|---|---|---|
Text | A2uiTextComponent | a2ui-text |
| Prop | Type | Description |
|---|---|---|
text | string | The text content to display |
#Image
Renders an <img> element.
| A2UI type | Angular component | Selector |
|---|---|---|
Image | A2uiImageComponent | a2ui-image |
| Prop | Type | Description |
|---|---|---|
url | string | Image source URL |
alt | string | Alt text for accessibility |
#Icon
Renders an icon glyph as a text span. The name prop is displayed directly — use an emoji or a Unicode symbol.
| A2UI type | Angular component | Selector |
|---|---|---|
Icon | A2uiIconComponent | a2ui-icon |
| Prop | Type | Description |
|---|---|---|
name | string | Glyph to render (e.g., "✓", "⚠️") |
#Divider
Renders a horizontal rule. Has no props.
| A2UI type | Angular component | Selector |
|---|---|---|
Divider | A2uiDividerComponent | a2ui-divider |
#Layout Components
Layout components receive childKeys — an array of component IDs — and render each child via json-render's RenderElementComponent. They also receive the full spec so that child elements can be looked up by key.
#Row
Arranges children horizontally with a flex row layout.
| A2UI type | Angular component | Selector |
|---|---|---|
Row | A2uiRowComponent | a2ui-row |
| Prop | Type | Description |
|---|---|---|
childKeys | string[] | Ordered list of child component IDs |
spec | Spec | Injected automatically by the render engine |
#Column
Arranges children vertically with a flex column layout.
| A2UI type | Angular component | Selector |
|---|---|---|
Column | A2uiColumnComponent | a2ui-column |
| Prop | Type | Description |
|---|---|---|
childKeys | string[] | Ordered list of child component IDs |
spec | Spec | Injected automatically by the render engine |
#Card
Renders children inside a rounded bordered card container with an optional title.
| A2UI type | Angular component | Selector |
|---|---|---|
Card | A2uiCardComponent | a2ui-card |
| Prop | Type | Description |
|---|---|---|
title | string | Optional card heading |
childKeys | string[] | Ordered list of child component IDs |
spec | Spec | Injected automatically by the render engine |
#List
Renders children in a scrollable vertical list (max height 24rem).
| A2UI type | Angular component | Selector |
|---|---|---|
List | A2uiListComponent | a2ui-list |
| Prop | Type | Description |
|---|---|---|
childKeys | string[] | Ordered list of child component IDs |
spec | Spec | Injected automatically by the render engine |
For data-driven lists, use the A2uiChildTemplate form instead of static childKeys. Set children to {"path": "/items", "componentId": "item-template"} and the surface component will expand the template once per array item. See the Surface Component page for details.
#Interactive Components
Interactive components support two-way data binding and button actions. They receive two special injected props:
_bindings— aRecord<string, string>auto-populated bysurfaceToSpec()from path references in the component definition. Maps prop names to JSON Pointer paths. When the user changes a bound value, the component emits ana2ui:datamodel:event. Agents do not write_bindingsdirectly — they use path references (e.g.,{"path": "/name"}) and the render pipeline extracts bindings automatically.emit— injected by the render engine; components call it to dispatch events back to the chat.
#Button
Renders a button that dispatches an action when clicked.
| A2UI type | Angular component | Selector |
|---|---|---|
Button | A2uiButtonComponent | a2ui-button |
| Prop | Type | Description |
|---|---|---|
label | string | Button label text |
variant | 'primary' | 'borderless' | Visual style. Defaults to 'primary' |
disabled | boolean | Disables the button when true |
action | A2uiAction | Action to execute on click (event or function call) |
validationResult | A2uiValidationResult | Pre-computed validation result — button is disabled if valid is false |
emit | injected | Event emitter provided by the render engine |
Action types:
Validation checks reference built-in validators by name. If any check fails, the button is automatically disabled:
#TextField
A single-line text input with optional label and placeholder.
| A2UI type | Angular component | Selector |
|---|---|---|
TextField | A2uiTextFieldComponent | a2ui-text-field |
| Prop | Type | Description |
|---|---|---|
label | string | Input label |
value | string | Current value (resolved from path reference) |
placeholder | string | Placeholder text |
validationResult | A2uiValidationResult | Validation state — shows errors below input when invalid |
_bindings | Record<string, string> | Auto-populated by surfaceToSpec() from path references |
emit | injected | Event emitter provided by the render engine |
The path reference {"path": "/name"} is resolved by surfaceToSpec(), which also populates _bindings automatically.
#CheckBox
A labeled checkbox with two-way binding for its checked state.
| A2UI type | Angular component | Selector |
|---|---|---|
CheckBox | A2uiCheckBoxComponent | a2ui-check-box |
| Prop | Type | Description |
|---|---|---|
label | string | Checkbox label |
checked | boolean | Current checked state (resolved from path reference) |
validationResult | A2uiValidationResult | Validation state — shows errors below checkbox when invalid |
_bindings | Record<string, string> | Auto-populated by surfaceToSpec() from path references |
emit | injected | Event emitter provided by the render engine |
#MultipleChoice
A single-select dropdown or multi-select checkbox list. Set maxAllowedSelections to 1 or less for a dropdown; set it above 1 for a checkbox list.
| A2UI type | Angular component | Selector |
|---|---|---|
MultipleChoice | A2uiMultipleChoiceComponent | a2ui-multiple-choice |
| Prop | Type | Description |
|---|---|---|
label | string | Field label |
options | { label: string; value: string }[] | Resolved option labels and values |
selections | string | string[] | Current selected value or values (resolved from path reference) |
maxAllowedSelections | number | 1 or less renders a dropdown; higher values render checkboxes |
_bindings | Record<string, string> | Auto-populated by surfaceToSpec() from path references |
emit | injected | Event emitter provided by the render engine |
#DateTimeInput
A date, time, or datetime input with two-way binding.
| A2UI type | Angular component | Selector |
|---|---|---|
DateTimeInput | A2uiDateTimeInputComponent | a2ui-date-time-input |
| Prop | Type | Description |
|---|---|---|
label | string | Input label |
value | string | Current value (resolved from path reference) |
inputType | 'date' | 'time' | 'datetime-local' | HTML input type. Defaults to 'date' |
min | string | Minimum allowed value |
max | string | Maximum allowed value |
validationResult | A2uiValidationResult | Validation state — shows errors below input when invalid |
_bindings | Record<string, string> | Auto-populated by surfaceToSpec() from path references |
emit | injected | Event emitter provided by the render engine |
#Slider
A range slider input with two-way binding.
| A2UI type | Angular component | Selector |
|---|---|---|
Slider | A2uiSliderComponent | a2ui-slider |
| Prop | Type | Description |
|---|---|---|
label | string | Slider label |
value | number | Current value (bind via _bindings) |
min | number | Minimum value |
max | number | Maximum value |
step | number | Step increment |
validationResult | A2uiValidationResult | Validation state — shows errors below slider when invalid |
_bindings | Record<string, string> | Auto-populated by surfaceToSpec() from path references |
emit | injected | Event emitter provided by the render engine |
#Layout Components (continued)
#Tabs
A tabbed container that shows one child panel at a time based on the selected tab index.
| A2UI type | Angular component | Selector |
|---|---|---|
Tabs | A2uiTabsComponent | a2ui-tabs |
| Prop | Type | Description |
|---|---|---|
tabs | {label: string, childKeys: string[]}[] | Tab definitions with labels and child component IDs |
selected | number | Currently selected tab index. Defaults to 0 |
_bindings | Record<string, string> | Auto-populated by surfaceToSpec() from path references |
spec | Spec | Injected automatically by the render engine |
emit | injected | Event emitter provided by the render engine |
#Modal
A dialog overlay that renders child content when open. Supports an optional title and dismissible close button.
| A2UI type | Angular component | Selector |
|---|---|---|
Modal | A2uiModalComponent | a2ui-modal |
| Prop | Type | Description |
|---|---|---|
title | string | Optional modal heading |
open | boolean | Whether the modal is visible |
childKeys | string[] | Child component IDs rendered inside the modal body |
dismissible | boolean | Shows a close button when true. Defaults to true |
_bindings | Record<string, string> | Bind open to a data model path |
spec | Spec | Injected automatically by the render engine |
emit | injected | Event emitter provided by the render engine |
#Media Components
#Video
Renders an HTML5 <video> element.
| A2UI type | Angular component | Selector |
|---|---|---|
Video | A2uiVideoComponent | a2ui-video |
| Prop | Type | Description |
|---|---|---|
url | string | Required. Video source URL |
poster | string | Poster image URL shown before playback |
autoplay | boolean | Start playback automatically. Defaults to false |
controls | boolean | Show native playback controls. Defaults to true |
#AudioPlayer
Renders an HTML5 <audio> element.
| A2UI type | Angular component | Selector |
|---|---|---|
AudioPlayer | A2uiAudioPlayerComponent | a2ui-audio-player |
| Prop | Type | Description |
|---|---|---|
url | string | Required. Audio source URL |
autoplay | boolean | Start playback automatically. Defaults to false |
controls | boolean | Show native playback controls. Defaults to true |
#Built-in Functions
Props that use A2uiFunctionCall can reference these built-in functions:
| Function | Args | Description |
|---|---|---|
formatNumber | value, precision, grouping | Formats a number with optional decimal places and thousands grouping |
formatCurrency | value, locale, currency | Formats a number as a currency string (default: en-US / USD) |
formatDate | value, locale | Formats an ISO date string using toLocaleDateString |
pluralize | count, singular, plural | Returns singular or plural form based on count |
openUrl | url | Opens a URL in a new tab (also usable as a button action) |
and | any named args | Returns true if all arg values are truthy |
or | any named args | Returns true if any arg value is truthy |
not | value | Negates a boolean value |
#Component Summary
| A2UI Type | Angular Component | Category |
|---|---|---|
Text | A2uiTextComponent | Display |
Image | A2uiImageComponent | Display |
Icon | A2uiIconComponent | Display |
Divider | A2uiDividerComponent | Display |
Row | A2uiRowComponent | Layout |
Column | A2uiColumnComponent | Layout |
Card | A2uiCardComponent | Layout |
List | A2uiListComponent | Layout |
Button | A2uiButtonComponent | Interactive |
TextField | A2uiTextFieldComponent | Interactive |
CheckBox | A2uiCheckBoxComponent | Interactive |
MultipleChoice | A2uiMultipleChoiceComponent | Interactive |
Tabs | A2uiTabsComponent | Layout |
Modal | A2uiModalComponent | Layout |
Video | A2uiVideoComponent | Media |
AudioPlayer | A2uiAudioPlayerComponent | Media |
DateTimeInput | A2uiDateTimeInputComponent | Interactive |
Slider | A2uiSliderComponent | Interactive |