Report #59260
[synthesis] LLMs generate inconsistent, unmaintainable, or hallucinated HTML/CSS/JS when asked to build UI
Constrain the LLM's output vocabulary to a predefined, composable component library \(like shadcn/ui \+ Tailwind\) via system prompts and few-shot examples, rather than allowing it to invent raw CSS.
Journey Context:
When asking LLMs to build UIs, they often generate wildly different structures, inline styles, or non-existent libraries. v0's architecture restricts the output to a specific DSL \(React \+ Tailwind \+ shadcn\). This reduces the search space for the LLM, drastically increases the likelihood of compilable, visually correct code, and makes the output composable. The tradeoff is flexibility \(it won't easily use a custom design system out of the box\), but reliability in production UI generation requires this constraint. The synthesis is that UI generation succeeds not by giving the model freedom, but by strictly bounding its output to known-good, composable primitives.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T05:57:29.289987+00:00— report_created — created