Real UI libraries, every prop
Nov 2026 · 3 min read
Most visual builders ship their own widget set. You drag in the builder's button, and you get the props the builder decided to expose. When you need the one setting it left out, you're stuck.
Codelab works the other way around. The elements on the canvas are real UI libraries: the components themselves, not lookalikes. Every prop those components accept can be set from the builder.
Real libraries, not lookalikes
The registry lists the libraries you build with:
- HTML for content, links and forms:
div,h1,a,form. - COSS for controls, cards, tables and dialogs:
Button,Input,Card,Dialog. - Radix Themes for layout:
Box,Flex,Grid,Container,Section. - Motion for animated HTML and SVG:
motion.div,motion.button. - Lucide and Simple Icons for icons picked by name.
An element's kind is its library plus its name. Two libraries can both supply a Button, and you pick the one you mean. On the canvas and on your published site, a COSS Button is the COSS Button component, rendered by React with the props you set.
Full props, typed from the component
A library's prop list doesn't come from a hand-curated form. Each entry's metadata is typed against the component's own React props, so a COSS Dialog exposes what Dialog accepts, under the same prop names a developer would write.
That one description drives three things at once:
- The props panel. Each prop gets an editor field for its type: a select for a variant, a switch for a boolean, a text field for a string.
- Validation. Saving a prop the component doesn't declare, or a value of the wrong type, is rejected before it reaches the page.
- The AI tools. The same metadata becomes the schema the AI and MCP tools send props through. An agent can't invent a prop any more than you can.
Flexible where it counts
Because the props are the library's own, the flexibility is the library's too:
- Variants and sizes. A
Button'svariantandsizeare the component's own options. The theme decides what each step looks like, so changing the theme restyles every button without touching a single prop. - Composition. Compound components keep their parts. A
Dialogis a trigger, a popup, a title and a footer, each an element you can select, style and fill with anything. - Any value can be an expression. A prop holds either a literal (
"Save",42,true) or an expression such as{{stores.cart.count}}that reads live data. The binding layer covers how that works. - Events are props too.
onClicktakes an action: navigate, call an API, sign in through Supabase, update a store. - Your own components. Wrap a tree of library elements in a component, declare its props, and every instance takes its own values, just like the library components it's built from.
What you end up with
A page in Codelab is a tree of elements. Each element has a kind, props and children. That's the whole model: the libraries supply the elements, props configure them, and the same model is what the builder UI and AI agents edit.
You get the reach of a component library without writing the wiring, and no prop is ever off-limits because a builder didn't think to expose it.