Material 3 Expressive renderer for A2UI (React, v0.9.1) #2628
romulloqueiroz
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi all,
I built a React renderer for A2UI on top of Google's
@a2ui/web_corethat maps all 18 Basic Catalog components onto Material 3 Expressive, Google's current Material design language, using the@language-lit/material3-expressiveReact design system.Try it: https://m3e.language-lit.com/a2ui/ streams four scripted scenarios live in the browser with no backend or API key: a streaming surface with placeholders, a reservation form with two-way binding,
checksvalidation and an action carrying the resolved values, a card with tabs and a modal, and live data-model updates with a template list and a second surface.a2ui-demo.mp4
What it does
Text,Button,TextField,Card,Tabs,Modal/Dialog,Slider,CheckBox,ChoicePicker,DateTimeInput,Image,Video,AudioPlayer,Icon,Divider,Row,Column,List.checksthat gate buttons and surface messages after a field is touched, function calls and templates viaweb_core.onActionwith the surface, source component and resolved context.useA2uihook plusA2uiSurface; the catalog also works under the official@a2ui/reactsurface if you already use it.Install
One thing I ran into that may help other renderer authors:
web_core'sDataModel.setkeeps theupdateDataModelvalue object by reference and writes user input into it, so if you replay the same message objects (tests, demos, fixtures) the second run starts with the first run's input. The renderer copies messages before processing.Feedback, bug reports and integration stories are very welcome. I have also opened a PR to add it to the ecosystem renderers page.
All reactions