Skip to content

A2UI Component Reference

A2UI (Agent-to-UI) is Flow-Like’s protocol for agent-driven interfaces. It enables AI agents to generate rich, interactive UIs that render natively across platforms.

A2UI components are organized into categories:

  • Layout - Structure and arrangement of content
  • Display - Visual content presentation
  • Interactive - User input and actions
  • Container - Grouping and organization
  • Game/Visual - Advanced graphics and game elements

Arranges children horizontally in a flex row.

{
"type": "Row",
"props": {
"gap": "4",
"justify": "between",
"align": "center",
"wrap": true
},
"children": [...]
}
PropertyTypeDefaultDescription
gapstring"0"Space between children (Tailwind spacing)
justifystring"start"Justify content: start, end, center, between, around, evenly
alignstring"stretch"Align items: start, end, center, stretch, baseline
wrapbooleanfalseWhether children should wrap to next line

Arranges children vertically in a flex column.

{
"type": "Column",
"props": {
"gap": "4",
"align": "center"
},
"children": [...]
}
PropertyTypeDefaultDescription
gapstring"0"Space between children
justifystring"start"Justify content
alignstring"stretch"Align items

CSS Grid layout with configurable columns.

{
"type": "Grid",
"props": {
"cols": 3,
"gap": "4",
"responsive": {
"sm": { "cols": 1 },
"md": { "cols": 2 },
"lg": { "cols": 3 }
}
},
"children": [...]
}
PropertyTypeDefaultDescription
colsnumber1Number of columns
rowsnumber-Number of rows (auto if not set)
gapstring"0"Gap between grid items
responsiveobject-Breakpoint-specific overrides

Overlays children on top of each other (z-axis stacking).

{
"type": "Stack",
"props": {
"align": "center"
},
"children": [...]
}

Renders a dynamic list from a data template.

{
"type": "List",
"props": {
"data": { "path": "/items" },
"keyField": "id",
"direction": "vertical"
},
"template": {
"type": "Card",
"props": {
"title": { "path": "/items/$index/name" }
}
}
}
PropertyTypeDescription
dataBoundValuePath to array data
keyFieldstringUnique key field for each item
templateComponentTemplate to render for each item
directionstringvertical or horizontal

Displays text content with typography options.

{
"type": "Text",
"props": {
"content": "Hello, World!",
"variant": "h1",
"color": "primary"
}
}
PropertyTypeDefaultDescription
contentBoundValue-Text content (required)
variantstring"body"Typography variant: h1-h6, body, caption, label
colorstring-Text color
alignstring"left"Text alignment
truncatebooleanfalseTruncate with ellipsis
maxLinesnumber-Maximum lines before truncation

Displays an image with optional loading states.

{
"type": "Image",
"props": {
"src": { "path": "/user/avatar" },
"alt": "User avatar",
"fit": "cover",
"aspectRatio": "1/1"
}
}
PropertyTypeDescription
srcBoundValueImage URL
altstringAlt text for accessibility
fitstringObject fit: cover, contain, fill, none
aspectRatiostringAspect ratio (e.g., "16/9", "1/1")
fallbackstringFallback image URL

Displays an icon from the icon library.

{
"type": "Icon",
"props": {
"name": "check",
"size": "24",
"color": "green"
}
}
PropertyTypeDefaultDescription
namestring-Icon name (required)
sizestring"16"Icon size in pixels
colorstring-Icon color

Renders Markdown content.

{
"type": "Markdown",
"props": {
"content": "# Hello\n\nThis is **bold** text."
}
}

A visual separator line.

{
"type": "Divider",
"props": {
"orientation": "horizontal",
"variant": "solid"
}
}

Clickable button with various styles.

{
"type": "Button",
"props": {
"label": "Click me",
"variant": "primary",
"size": "md",
"disabled": false
},
"actions": {
"onClick": {
"type": "submit",
"payload": { "action": "save" }
}
}
}
PropertyTypeDefaultDescription
labelBoundValue-Button text
variantstring"default"Style variant: default, primary, secondary, outline, ghost, destructive
sizestring"md"Size: sm, md, lg
disabledBoundValuefalseDisabled state
loadingBoundValuefalseLoading state
iconstring-Icon name
iconPositionstring"left"Icon position: left, right

Text input field with validation.

{
"type": "TextField",
"props": {
"value": { "path": "/form/email" },
"placeholder": "Enter email",
"type": "email",
"required": true
},
"actions": {
"onChange": {
"type": "updateData",
"path": "/form/email"
}
}
}
PropertyTypeDescription
valueBoundValueCurrent value
placeholderstringPlaceholder text
typestringInput type: text, email, password, number, tel, url
requiredbooleanRequired validation
minLengthnumberMinimum character length
maxLengthnumberMaximum character length
patternstringRegex pattern for validation
disabledBoundValueDisabled state

Checkbox input with label.

{
"type": "Checkbox",
"props": {
"checked": { "path": "/form/agree" },
"label": "I agree to the terms"
}
}

Toggle switch control.

{
"type": "Switch",
"props": {
"checked": { "path": "/settings/notifications" },
"label": "Enable notifications"
}
}

Range slider input.

{
"type": "Slider",
"props": {
"value": { "path": "/settings/volume" },
"min": 0,
"max": 100,
"step": 1
}
}

Dropdown selection.

{
"type": "Select",
"props": {
"value": { "path": "/form/country" },
"options": [
{ "value": "us", "label": "United States" },
{ "value": "uk", "label": "United Kingdom" }
],
"placeholder": "Select a country"
}
}

Radio button group.

{
"type": "RadioGroup",
"props": {
"value": { "path": "/form/plan" },
"options": [
{ "value": "free", "label": "Free", "description": "Basic features" },
{ "value": "pro", "label": "Pro", "description": "All features" }
]
}
}

Date and time picker.

{
"type": "DateTimeInput",
"props": {
"value": { "path": "/form/date" },
"mode": "datetime",
"minDate": "2024-01-01",
"maxDate": "2025-12-31"
}
}

A bordered container with optional header and footer.

{
"type": "Card",
"props": {
"title": "Card Title",
"description": "Card description",
"variant": "elevated"
},
"children": [...]
}
PropertyTypeDescription
titleBoundValueCard title
descriptionBoundValueCard description
variantstringStyle: default, elevated, outlined
clickablebooleanWhether card is clickable

Dialog overlay.

{
"type": "Modal",
"props": {
"open": { "path": "/ui/modalOpen" },
"title": "Confirm Action",
"size": "md"
},
"children": [...]
}

Tabbed content container.

{
"type": "Tabs",
"props": {
"activeTab": { "path": "/ui/activeTab" },
"tabs": [
{ "id": "overview", "label": "Overview" },
{ "id": "settings", "label": "Settings" }
]
},
"children": {
"overview": [...],
"settings": [...]
}
}

Collapsible content sections.

{
"type": "Accordion",
"props": {
"type": "single",
"collapsible": true
},
"items": [
{
"id": "faq1",
"title": "What is A2UI?",
"content": { "type": "Text", "props": { "content": "..." } }
}
]
}

Scrollable container with custom scrollbars.

{
"type": "ScrollArea",
"props": {
"maxHeight": "400px",
"orientation": "vertical"
},
"children": [...]
}

All components accept a style property for customization:

{
"type": "Card",
"style": {
"className": "p-6 bg-blue-50 dark:bg-blue-950 rounded-xl shadow-lg hover:shadow-xl transition-shadow"
}
}

For complex responsive layouts:

{
"style": {
"className": "p-4 md:p-6 lg:p-8",
"responsive": {
"sm": { "hidden": true },
"md": { "display": "flex", "flexDirection": "row" }
}
}
}

A2UI uses BoundValue for dynamic data:

{ "content": "Static text" }
{ "count": 42 }
{ "enabled": true }
{ "content": { "path": "/user/name" } }
{ "items": { "path": "/data/products" } }

In List templates, use $index and $item:

{
"type": "List",
"props": { "data": { "path": "/items" } },
"template": {
"type": "Text",
"props": {
"content": { "path": "/items/$index/name" }
}
}
}

Components can trigger actions:

{
"actions": {
"onClick": {
"type": "navigate",
"payload": { "route": "/dashboard" }
},
"onChange": {
"type": "updateData",
"path": "/form/value"
},
"onSubmit": {
"type": "invoke",
"flowId": "process-form",
"payload": { "data": { "path": "/form" } }
}
}
}
TypeDescription
updateDataUpdate data model at path
navigateNavigate to a route
invokeInvoke a Flow
submitSubmit form data
openModalOpen a modal
closeModalClose a modal
customCustom action handler