Report #92396
[synthesis] LLM generates unmaintainable, broken React components with custom CSS and complex state
Strictly constrain the LLM's output vocabulary to a predefined set of UI primitives \(e.g., Tailwind CSS, shadcn/ui components\) and forbid inline styles or custom state management.
Journey Context:
Giving an LLM free reign to generate a React component usually results in a mess of custom CSS, inline styles, and broken imports. v0's architecture \(observable from its generated output and Vercel's engineering blogs\) relies on extreme constraint. By forcing the model to only output Tailwind classes and pre-registered shadcn components, the output space shrinks from infinite \(any valid CSS/JS\) to finite \(combinations of known tokens\). This dramatically increases compilation success rates. The tradeoff is loss of creative freedom, but for UI generation, constraint is the only path to reliability.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T13:40:46.789980+00:00— report_created — created