Quiz Reveal
A quiz that shakes the wrong answer, then reveals the right one anyway, with the score correcting itself in the same beat.
Capital of Portugal?
Build a quiz answer reveal that handles a wrong pick properly. Structure: a question line and four answer rows. Each row is a rounded rectangle with the answer text on the left and space for a verdict icon on the right. Three beats, and the gap between them is the point: 1. Idle: all four rows are paper with a hairline border. 2. Pick (at ~800ms): the chosen row's border turns accent. Nothing else changes yet. Judging instantly makes the screen read as already decided before the user acted. 3. Verdict (at ~1350ms): the wrong pick turns red - tinted background, red border and text - and shakes on x through 0, -5, 5, -3, 3, 0 over 0.34s. A shake that holds its amplitude reads as a stuck error; one that decays reads as a wince. At the same moment the CORRECT answer turns green and reveals itself, even though nobody chose it. This is the whole component: hiding the right answer after a miss wastes the one moment the reader is paying attention. Both verdict rows spring in an icon - a check for the correct row, a cross for the wrong one - at stiffness ~560, and both go bold. Colour alone would leave a colorblind reader with two identical rows. The score line below updates in the same beat as the verdict (4/4 becomes 4/5). Animating the answer and leaving the score to catch up later splits one event into two. Accessibility: the score line is aria-live="polite"; verdict icons are aria-hidden. Under prefers-reduced-motion, render the judged state directly with no shake and no springs. Colors as tokens: paper rows, hairline borders, one accent for the pending pick, and semantic red and green for the verdict. Build the component, not this demo of it. - Ambient motion that IS the component may loop: a drifting background, a marquee, a spinner while something is genuinely loading. - Do not add any timer, interval, loop or script that performs a person's action by itself. No auto-hover, no auto-click, no cycling through states, no pretend submitting, no replaying the interaction on a schedule. - Every state that answers a person waits for a real event from that person. - Placeholder copy and sample content are welcome. Simulated behaviour is not.