Dev Helpers

UI Components / Mobile interaction patterns

Tap-to-reveal answer card

Dev Helpers · September 14, 2025

Native disclosure lets a reader reveal an answer without a custom state machine. The summary should still describe what will be revealed.

Worked example

<div class="box stack">
  <p class="kicker">Flash card</p>
  <h2>What is a baseline?</h2>
  <details>
    <summary>Reveal answer</summary>
    <p>The imaginary line on which letters sit.</p>
  </details>
</div>

Implementation notes

Do not hide required instructions exclusively behind a closed answer card. A disclosure is most useful for optional detail or a deliberate reveal exercise.

Try it yourself

Toggle it with Enter and Space and inspect keyboard focus.

Open the UI Components example →

Editorial date September 14, 2025 · Published December 6, 2026

Related articles

Article byline

A byline combines authorship and dates without competing with the headline. Use a machine-readable time value alongside the visible date.

Audio episode transcript card

An episode transcript serves readers who cannot or prefer not to play audio. Identify speakers in text and keep the transcript easy to navigate.

Split editorial hero

A split editorial hero needs a deliberate reading order when columns collapse. Place essential copy where it remains intelligible without the accompanying image.