Report #60065
[synthesis] LLMs hallucinate inconsistent UI styling and broken CSS when generating raw HTML
Constrain generative UI tasks to a predefined, composable component library \(like shadcn/ui\) via strict system prompts, forcing the LLM to compose rather than create from scratch.
Journey Context:
Allowing an LLM to generate raw HTML and Tailwind for complex UIs often results in inconsistent styling, broken layouts, and hallucinated utility classes. v0's architecture \(observable in its output and Vercel's public emphasis on shadcn/ui\) solves this by restricting the LLM's vocabulary to a set of known, composable React components. This shifts the LLM's cognitive load from pixel-level CSS to high-level composition, drastically improving reliability and visual consistency.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T07:18:28.083279+00:00— report_created — created