Quickstart
Build and preview your first interactive component locally in 5 minutes.
You’ll build this
Section titled “You’ll build this”Live — click Increment
Before you start
Section titled “Before you start”- The
usevalCLI → install it (2 min)
-
Create a project folder and a component.
Terminal window mkdir my-ui && cd my-uiuseval components create counterThis creates
components/counter.xml, plus its settings and sample data. -
Write the markup. Replace
components/counter.xmlwith:components/counter.xml <Card padding="6"><State name="count" value="0" /><Column gap="4"><Text size="xl" weight="bold">My first interactive component</Text><Text>Button presses: {= count }</Text><Button label="Increment" set="count = count + 1" /></Column></Card> -
Check it.
Terminal window useval analyze✓ You should see no errors. -
Terminal window useval serve --port 3000Open localhost:3000 and click Increment.
✓ You should see the card above. Edit the XML — the preview reloads by itself.
What is Val Generative UI?The idea behind it, in one picture.
Core ideas: componentsMarkup, shapes and data.