I thought AI can't generate text? How does this have readable text in output.
It’s (probably) generating text in some encoding that represents a view hierarchy along with basic layout attributes (alignment etc)
Probably fine-tuned some on human-created examples with the same format.
So the prompt provides the example format and then merges in the user’s request. LLM spits output that is then parsed and transform into css/figma etc.
What does behind the scenes might isn’t necessarily 1:1 with old image generation stuff either way.