A2UI Components
UI components used in the Garden AI Advisor. Each component follows the A2UI protocol for agent-generated adaptive interfaces.
StepIndicator
NavigationShows progress through a multi-step flow. Dots transition from inactive → active → completed.
{
"id": "steps",
"type": "StepIndicator",
"current": 2,
"total": 3
}
ImageUpload
InputDrag & drop zone for image uploads. Supports click-to-select and drag-over visual feedback.
{
"id": "upload-area",
"type": "ImageUpload",
"maxSize": "10MB",
"action": {
"type": "agent",
"name": "analyzeImage"
}
}
ImagePreview
DisplayShows uploaded image with a remove button overlay. Used after image selection.
{
"id": "preview",
"type": "ImagePreview",
"src": { "path": "/uploadedImage" },
"removable": true
}
AnalysisCard
DisplayDisplays AI analysis results with an icon and summary text. Uses a gradient background.
{
"id": "analysis",
"type": "AnalysisCard",
"title": "Analysis Complete!",
"content": { "path": "/analysis/summary" }
}
SuggestionItem
SelectionSelectable card for improvement suggestions. Click to toggle selection state.
{
"id": "suggestions",
"type": "CheckboxGroup",
"options": { "path": "/suggestions" },
"selected": { "path": "/selectedSuggestions" }
}
EstimateItem
DisplayDetailed cost breakdown for a selected improvement. Shows title, subtotal, and line-item details.
{
"id": "estimate-trees",
"type": "EstimateItem",
"title": "🌳 Add shade trees",
"subtotal": 850,
"details": [
{ "label": "Oak tree", "price": 400 },
{ "label": "Maple tree", "price": 350 }
]
}
TotalCard
DisplayProminent display of the total estimated cost. Uses gradient background to stand out.
{
"id": "total",
"type": "TotalCard",
"label": "Estimated Total",
"value": { "path": "/estimate/total" },
"currency": "USD"
}
LoadingSpinner
FeedbackAnimated spinner shown during API calls. Indicates the AI is processing.
Analyzing your garden...
{
"id": "loader",
"type": "LoadingSpinner",
"message": "Analyzing your garden..."
}
ErrorBox
FeedbackDisplays error messages with red styling. Used for API errors, validation errors, etc.
{
"id": "error",
"type": "ErrorBox",
"title": "Connection Error",
"message": { "path": "/error/message" }
}
RateLimitInfo
FeedbackWarning banner shown when approaching rate limits. Helps users understand usage constraints.
{
"id": "rate-limit",
"type": "RateLimitInfo",
"remaining": 3,
"resetIn": 45
}