Update A2UI Components
a2ui_update_componentsUpdate an A2UI surface by submitting a flat list of declarative components. Include a root entry to arrange layout, text, inputs, buttons, and images in real time.
Instructions
Add or update components on an A2UI surface.
Components are defined as a flat list with ID references. The component tree is built using the 'children' property.
IMPORTANT: You must include a component with id='root' as the entry point.
Available components:
Column: Vertical layout container (children: string[])
Row: Horizontal layout container (children: string[])
Card: Card container with optional title (children: string[], title?: string)
Text: Text display (text: string, style?: {...})
Button: Clickable button (label: string, variant?: 'primary'|'secondary'|'outlined', action?: string)
TextField: Input field (label: string, placeholder?: string, value?: string)
Image: Image display (src: string, alt?: string)
Divider: Horizontal line
Progress: Progress bar (value?: number 0-100, indeterminate?: boolean)
Example - Simple form: { "surface_id": "my_form", "components": [ { "id": "root", "component": "Column", "children": ["title", "name_field", "submit_btn"] }, { "id": "title", "component": "Text", "text": "Contact Form", "style": { "fontSize": 24, "fontWeight": "bold" } }, { "id": "name_field", "component": "TextField", "label": "Your Name", "placeholder": "Enter name..." }, { "id": "submit_btn", "component": "Button", "label": "Submit", "variant": "primary" } ] }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| components | Yes | Array of components. Must include a 'root' component. | |
| surface_id | Yes | Surface ID to update |