AI Design Code
Give your coding agent the longest button label in the design
A small responsive-card exercise catches layouts that look perfect with sample copy.
“Buy now” fits into almost any card. “Request an accessible seating arrangement” tests the design you are actually building. Before you ask an agent to implement a card, give it three content examples: the shortest label, the longest plausible label, and a message that appears when the preferred option is unavailable.
For a ticketing prototype, put the event name, time, price, and action in that order. Let the action label wrap. A description can grow without hiding the price or pushing the button behind the next card. A fixed-height card often conceals the problem until a content editor does something entirely reasonable.
Test with a narrow viewport and real text
W3C’s reflow guidance explains the expectation that ordinary vertically scrolling content can be read at a width equivalent to 320 CSS pixels without scrolling in two directions, with exceptions for content that genuinely needs a two-dimensional layout. An event card gives you a straightforward place to practice. W3C WAI • Understanding reflow
At that width, try “Community workshop,” then “Community workshop for parents and early-career educators.” Swap “Register” for the longer accessible-seating label. Finally, increase the browser zoom and reach the button using the keyboard. If the footer overlaps, ask the agent which fixed dimension or positioning rule created the collision. Review the explanation against the actual styles.
Save two screenshots at the same viewport, plus the troublesome text as a reusable fixture. The next person to change the component should be able to reproduce the problem in one minute. A screenshot shows the failure. The fixture keeps it from quietly coming back.