figma guide

Designing modals and dialogs in Figma: overlays, focus traps, and handoff

Build modal and dialog UI in Figma with scrims, size tokens, component variants, and prototype flows—plus specs engineers need for focus, dismiss, and stacking.

Published
Updated
Jun 04, 2026
Read time
6 min
Level
Intermediate

Quick answer

Modals in Figma should be a component set with variants for size (sm/md/lg/full-screen), type (dialog, alert, drawer-style sheet), and state (open default is enough for static handoff; add loading/disabled on primary actions). Structure every modal as: scrim (semi-transparent fill) → surface (card with radius + shadow) → header / body / footer with auto layout. Document dismiss rules (Esc, outside click, explicit close only) in the component description for Dev Mode. Pair with form field components inside the body, interactive button states on actions, and accessibility plugins for contrast on scrims. Browse setup and pattern guides on the Figma guides hub.


Who this is for

  • Product designers shipping confirmations, paywalls, and onboarding overlays.
  • Design system maintainers publishing one dialog primitive for web and mobile.
  • Engineers who need clear rules for focus trap, z-index, and scroll lock—not just a pretty card.

LayerRoleTypical spec
ScrimDims page behind modalrgba(0,0,0,0.48)0.64; full viewport
SurfaceDialog cardRadius 12–16; elevation token (shadows guide)
HeaderTitle + optional closeMin height 56–64; title left, icon button right
BodyCopy, forms, listsScroll when content exceeds max height
FooterActionsPrimary right (web); stack on mobile
Focus ringKeyboard visibilityShow on default button variant in design spec

Verdict: if you only draw the white card without scrim and footer actions, handoff will miss half the production behavior.


TypeWhen to usePrimary actionDismiss
AlertIrreversible or criticalOne destructive or primaryOften explicit button only
ConfirmReversible choiceCancel + ConfirmEsc + outside click (document)
Form modalShort data entrySubmit + CancelValidate before close
Full-screen sheetMobile-heavy flowsBack or DoneSwipe down (mobile spec)
Non-modal panelPersistent toolsN/ANo scrim—use side panel pattern

Link destructive flows to your form validation states so error text does not overflow the modal width.


Modal / Dialog (component set)
├── Variant: size = sm | md | lg | fullscreen
├── Variant: type = dialog | alert | sheet
└── Structure (auto layout, vertical):
    ├── Scrim (absolute, fill parent frame)
    └── Surface (centered, max-width token)
        ├── Header (horizontal auto layout)
        ├── Body (vertical, gap token, scroll if needed)
        └── Footer (horizontal, gap 12, primary aligned end)

Sizing tokens (web starting point):

SizeMax widthMax body heightUse case
sm400px240pxConfirmations, alerts
md480–560px360pxSettings snippet, short forms
lg640–720px480pxMulti-field onboarding
fullscreen100% minus safe area100%Mobile wizards

Use layout grids on the page behind the modal so the surface aligns to your 8pt scale—not arbitrary centering.


Scrim and elevation (do not eyeball)

PropertyRecommendationWhy
Scrim colorSemantic overlay/scrim tokenDark mode needs different alpha (dark mode tokens)
Surface shadowelevation/overlay or lg shadowSeparates from page without heavy blur
Border1px border/subtle optionalHelps on busy marketing backgrounds
Z-index noteIn description: z-modal = 1300 (example)Devs map to CSS layers

Run contrast check: title and body text on the surface must pass WCAG against the card background, not the scrim.


Prototyping modals without misleading stakeholders

  1. Base frame: full page at target breakpoint (responsive frames).
  2. Overlay frame: duplicate page + place modal component instance on top; scrim covers full frame.
  3. Interaction: button on page → Open overlay (or navigate to overlay frame with Instant transition).
  4. Close: close icon → Close overlay or navigate back.
  5. Optional: second overlay frame for stacked dialog (rare—document as edge case).

For motion, keep transitions dissolve 200ms or instant—Figma will not replicate focus trap; note that in presenter notes. See prototype basics and animation limits.

Common mistake: prototyping modal as a separate page with no scrim—stakeholders think the underlying page is still interactive.


Accessibility and behavior spec (write this in Dev Mode)

BehaviorWhat to document
Focus trapTab cycles inside modal until closed
Initial focusFirst field or primary button
Esc keyCloses unless role=alertdialog
Outside clickOn/off per type (confirm vs alert)
Scroll lockBody scroll disabled while open
Return focusFocus returns to trigger on close

Add a small annotation layer on the handoff page listing these bullets—engineers rarely read scattered comments on the scrim.


Handoff checklist

DeliverableLocation
Component variantssize, type, button states
SpacingAuto layout gaps = spacing tokens
ColorsSemantic variables (color system)
Max height + scrollBody frame: overflow scroll note
Mobile safe areaFullscreen variant respects safe areas
Z-index stackDescription vs toast/banner layers

Use Dev Mode checklist before review. For token export beyond native inspect, see dev handoff plugins.


Stacking modals and nested dialogs

ScenarioDesign guidance
Confirm on top of form modalSecond scrim slightly darker; reduce first modal opacity 50%
Toast while modal openToast above modal z-index—show in separate artboard
Drawer + dialogAvoid; pick one overlay pattern per platform

If you must show two dialogs, ship a variant stacked=true on the component description—do not duplicate unrelated frames.


Common mistakes

MistakeConsequenceFix
No scrimLooks like inline cardAlways include dim layer
Modal wider than viewportHorizontal scroll on mobilemax-width: min(560px, 100vw - 32px) in spec
Detached buttonsInconsistent hover/disabledInstance from button library
Long copy without scrollOverflow hidden in devSet max height on body + scroll
Forms without error variantsBroken layout on validateUse form error variants
Sharing prototype link onlyMisses dismiss rulesDescription + handoff artboard

FAQ

Should the modal be a component or a frame template?

Component set if your team ships more than one dialog per quarter. Use a template frame only for marketing one-offs.

How do I show a modal on mobile in Figma?

Use fullscreen or bottom sheet variant on a 390px frame; anchor sheet to bottom with top radius 16+. Prototype with overlay, not a shrunk desktop card.

Can I use clip content instead of a scrim?

Clip content on the surface crops children—it does not dim the page. You still need a separate scrim rectangle behind the card.

Do modals belong in the team library?

Yes—same library as buttons and forms, shared tokens.


Bottom line

Treat modals as behavior + layout: scrim, sized surface, header/body/footer, and written dismiss/focus rules. Build variants for size and type, prototype with overlays, and hand off scroll and z-index explicitly. Continue with forms in Figma, sections for flow organization, and the tutorials hub.

Share on X

§ Keep reading

Related guides.