Pages
What are Pages?
Section titled βWhat are Pages?βPages are app-specific layouts built with A2UI components. Unlike widgets (which are reusable across projects), pages are configured specifically for your applicationβs needs.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ Your App ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€β Navigation: [Dashboard] [Reports] [Settings] ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€β ββ βββββββββββββββββββββββββββββββββββββββββββββββββββββββ ββ β PAGE CONTENT β ββ β β ββ β ββββββββββββ ββββββββββββ ββββββββββββ β ββ β β Widget β β Widget β β Widget β β ββ β ββββββββββββ ββββββββββββ ββββββββββββ β ββ β β ββ β ββββββββββββββββββββββββββββββββββββββββββββ β ββ β β Another Widget β β ββ β ββββββββββββββββββββββββββββββββββββββββββββ β ββ β β ββ βββββββββββββββββββββββββββββββββββββββββββββββββββββββ ββ ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββPage vs Widget
Section titled βPage vs Widgetβ| Aspect | Page | Widget |
|---|---|---|
| Scope | App-specific | Reusable anywhere |
| Purpose | Full-screen layout | Self-contained component |
| Navigation | Has route/URL | Embedded in pages |
| Sharing | Not shareable | Exportable/importable |
Page Structure
Section titled βPage StructureβEach page defines:
- Route - The URL path for this page
- Layout - How content is arranged
- Widgets - The components displayed
- Data Bindings - Connections to flows and variables
- Permissions - Who can access this page
Example Page Definition
Section titled βExample Page Definitionβ{ "id": "dashboard-page", "route": "/dashboard", "title": "Dashboard", "layout": { "type": "Column", "children": ["header", "metrics-row", "main-content"] }, "widgets": [ { "id": "header", "widgetRef": "app-header", "props": { "title": "Dashboard" } }, { "id": "metrics-row", "type": "Row", "children": ["metric-revenue", "metric-orders", "metric-customers"] }, { "id": "metric-revenue", "widgetRef": "kpi-card", "bindings": { "value": "/metrics/revenue" } } ], "permissions": { "roles": ["admin", "analyst"] }}Creating Pages
Section titled βCreating PagesβFlow-Like offers two approaches that produce the same A2UI output:
1. Visual Builder (Drag & Drop)
Section titled β1. Visual Builder (Drag & Drop)βThe visual builder lets you design pages interactively:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ Page Builder [Preview βΎ] ββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββ€β β β ββ WIDGETS β CANVAS β PROPERTIES ββ β β ββ βββββββββ β βββββββββββββββββββββββββββ β Widget: Card ββ β Text β β β βββββββ βββββββ β β βββββββββββββββ ββ βββββββββ β β β KPI β β KPI β β β Title: Revenue ββ βββββββββ β β βββββββ βββββββ β β Binding: ββ β Card β β β βββββββββββββββββββ β β [/metrics/rev βΎ] ββ βββββββββ β β β Chart β β β ββ βββββββββ β β βββββββββββββββββββ β β FLOW ACTIONS ββ β Chart β β β β β βββββββββββββββ ββ βββββββββ β βββββββββββββββββββββββββββ β On Click: ββ βββββββββ β β [Select flow βΎ] ββ β Table β β β ββ βββββββββ β β ββ β β ββββββββββββββββ΄ββββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββ€β Layers: [Page] > [Row] > [KPI Card] [Save] [Undo]ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ- Drag widgets from the palette
- Drop onto the canvas
- Configure properties and bindings
- Preview in real-time
- Save as A2UI format
2. AI Agent Generation
Section titled β2. AI Agent GenerationβDescribe what you want in natural language:
Create a dashboard page with:- Header showing "Sales Dashboard"- Three KPI cards: Revenue, Orders, Customers- Line chart showing revenue over time- Table of recent ordersThe agent generates the A2UI structureβwhich you can then refine in the visual builder.
Best of Both Worlds
Section titled βBest of Both WorldsβThe magic is that both approaches produce the same format:
- AI generates β You refine in builder
- You build manually β AI suggests improvements
- Start from template β Customize either way
3. Code-First
Section titled β3. Code-FirstβDefine pages programmatically:
const dashboardPage = { route: "/dashboard", layout: Column({ children: [ Header({ title: "Dashboard" }), Row({ children: [ KPICard({ binding: "/revenue" }), KPICard({ binding: "/orders" }), ] }), Chart({ binding: "/revenue-history" }) ] })};Page Layouts
Section titled βPage LayoutsβCommon Layout Patterns
Section titled βCommon Layout PatternsβSingle Column
βββββββββββββββββββββββββββ Header βββββββββββββββββββββββββββ€β ββ Content ββ βββββββββββββββββββββββββββ€β Footer βββββββββββββββββββββββββββSidebar Layout
ββββββββ¬βββββββββββββββββββ β Header ββ Side βββββββββββββββββββ€β bar β ββ β Content ββ β βββββββββ΄ββββββββββββββββββDashboard Grid
ββββββββββ¬βββββββββ¬ββββββββββ KPI β KPI β KPI βββββββββββ΄βββββββββ΄βββββββββ€β Chart ββββββββββββββββ¬βββββββββββββ€β Table β List ββββββββββββββββ΄βββββββββββββPage Navigation
Section titled βPage NavigationβPages integrate with your appβs navigation:
{ "navigation": { "items": [ { "label": "Dashboard", "page": "dashboard", "icon": "home" }, { "label": "Reports", "page": "reports", "icon": "chart" }, { "label": "Settings", "page": "settings", "icon": "gear" } ] }}Data Binding
Section titled βData BindingβPages can bind to:
- Flow outputs - Results from flow executions
- App variables - Global state
- User context - Current user info
- URL parameters - Route params
{ "bindings": { "user": "/context/user", "orders": "/flows/get-orders/output", "selectedId": "/route/params/id" }}Permissions
Section titled βPermissionsβControl page access:
{ "permissions": { "public": false, "roles": ["admin", "manager"], "conditions": [ { "variable": "/user/verified", "equals": true } ] }}Responsive Behavior
Section titled βResponsive BehaviorβPages adapt to screen sizes:
| Breakpoint | Layout Adjustment |
|---|---|
| Mobile | Stack columns vertically |
| Tablet | Two-column grid |
| Desktop | Full layout |