Skip to content
Learn Netverks

Lesson

Step 29/36 81% through track

reveal-modal

Reveal modal

Last reviewed May 28, 2026 Content v20260528
Track mode
iframe_html
Means
HTML preview sandbox
Reading
~1 min
Level
intermediate

This lesson

This lesson teaches Reveal modal—the ideas, syntax, and habits you need before moving on in Foundation.

Foundation skills help when you inherit marketing sites built on Zurb’s grid system.

You will apply Reveal modal in contexts like: Large marketing sites, email-adjacent layouts, and legacy responsive redesigns.

Read the lesson, edit HTML/CSS in the playground, press Run to preview, then answer the lesson MCQs.

Toward the end of the track—use it to consolidate patterns before the capstone or summary lessons.

Reveal is Foundation’s modal dialog. Triggers use data-open="modalId"; the panel is a div.reveal with data-reveal. Close with data-close on buttons or the overlay—Foundation moves focus and toggles aria-hidden when JS runs.

Structure

  • Keep headings inside the reveal for context
  • Primary actions stay in the modal footer area; destructive actions need clear labels
  • Avoid stacking multiple open reveals—initialize one dialog at a time

Compare with Bootstrap modals (data-bs-toggle="modal")—same UX contract, different attribute names. Interviewers care that you know modals require JS, focus trap testing, and escape hatch markup.

Self-check

  1. Which attribute opens a reveal from a button?
  2. What class marks the modal root element?
  3. How do users dismiss the overlay with keyboard-friendly controls?

Challenge

Open a modal

  1. Wire a button with data-open="myModal".
  2. Click to open; close with the close button.

Done when: Reveal modal opens and closes via Foundation JS.

Interview tip Lesson completion confidence

Can you explain this lesson in 30 seconds without reading notes?

Not saved yet.

Playground

Runs in your browser in a sandboxed frame. Backend runners appear when this track’s profile allows them.

Check yourself

Multiple choice — immediate feedback.

Discussion

Past discussion is visible to everyone. Only logged-in users can post comments and replies.

Starter discussion topics

  • Focus trap concerns?
  • data-reveal id match?

Sign up or log in to post comments and sync lesson progress across devices.

No discussion yet. Be the first to ask a question.

Jump