Webapp Parts & Types

Modals & Sheets

webmobiledesktopadmin

Modals are expensive. Each one breaks flow and costs a click to dismiss. Design them like you're paying for the user's attention. Because you are.

  • Variation 01

    Confirm Dialog

    aka Destructive Confirm · Alert Dialog

    Screenshot of github.comgithub.com

    A compact modal that confirms a destructive action. Names the consequence in the title, not the button.

    When to use

    Delete, archive, leave-team, transfer-ownership. Anything irreversible.

    Anatomy

    • Title. Names the consequence
    • Body. What happens after, in plain language
    • Cancel (secondary, left)
    • Destructive primary (right, danger color)
    • Focus trap + Esc to close + initial focus on Cancel

    Prompt

    Build a destructive confirm dialog using Radix Dialog or a comparable headless primitive. 400px wide, 24px padding, rounded-xl, with a soft backdrop (no harsh black). Title in 17px medium that names the consequence ('Delete project Atlas?'). Below: 14px muted paragraph describing irreversibility. Footer with two buttons - left: ghost 'Cancel' (initial focus); right: destructive solid red 'Delete project'. Focus trap, Esc to dismiss, click outside to dismiss only on non-destructive variants. Honour prefers-reduced-motion (fade only, no scale).

    Polish & tuning

    2 of 4 unlocked

    Motion

    Ease-out for entrance, ease-in-out for state. 200ms hover, 400–600ms layout. Stagger children at 30–60ms so groups feel intentional, not synchronized.

    Spacing

    Pick one scale (4 or 8) and don't mix. Section padding 96–128px desktop, 48–64px mobile. Headline sits ~24px above the subhead; subhead ~32px above the CTA cluster.

    Pro

    Unlock the rest of the tuning notes.

    Buy Pro
  • Variation 02

    Command Modal

    aka Cmd-K · Command Palette

    Screenshot of linear.applinear.app

    Centered modal triggered by ⌘K. Single search input, grouped commands, keyboard-navigable list.

    When to use

    Power-user apps with many actions, navigation across deep trees, or quick switchers.

    Anatomy

    • ⌘K opens, Esc closes, /, arrows navigate
    • Search input at top with leading icon
    • Grouped results (Recent, Actions, Pages)
    • Highlighted row + footer with key hints
    • Empty state with suggestions

    Prompt

    Build a command modal triggered by ⌘K. Centered, 560px wide, rounded-xl with a strong backdrop blur. Top: search input with leading search icon, kbd '⌘K' on the right. Below: grouped results (Recent, Actions, Pages) with mono uppercase group headings. Each result row has a leading icon, label, optional subtitle, trailing kbd shortcut hint. Active row has an accent background. Arrow keys navigate, Enter triggers, Esc closes. Footer strip shows ↵ to select · ↑↓ to navigate · esc to close. Use cmdk library or equivalent.

    Polish & tuning

    2 of 4 unlocked

    Motion

    Ease-out for entrance, ease-in-out for state. 200ms hover, 400–600ms layout. Stagger children at 30–60ms so groups feel intentional, not synchronized.

    Spacing

    Pick one scale (4 or 8) and don't mix. Section padding 96–128px desktop, 48–64px mobile. Headline sits ~24px above the subhead; subhead ~32px above the CTA cluster.

    Pro

    Unlock the rest of the tuning notes.

    Buy Pro
  • Variation 03

    Sheet / Drawer

    aka Side Sheet · Bottom Sheet

    Screenshot of linear.applinear.app

    Slides in from an edge of the screen for medium-complexity tasks that need more space than a popover.

    When to use

    Editing a record, filters with many fields, previews. Preserves page context behind a translucent backdrop.

    Anatomy

    • Edge-anchored panel, 420–560px wide
    • Sticky header with title + close button
    • Scrollable body
    • Sticky footer for primary actions
    • Backdrop dims background, click to close

    Prompt

    Build a right-edge sheet drawer. Slides in from the right with a translate-x transition (260ms ease-out), backdrop fades in over the same duration with a 40% black overlay. Width: 480px desktop, 100vw mobile (then becomes bottom sheet with rounded top corners and a drag handle). Sticky header with title in 17px medium and close X button. Body scrolls independently. Sticky footer with ghost 'Cancel' and primary 'Save' aligned right. Focus trap, Esc closes, drag-down dismisses on mobile.

    Polish & tuning

    2 of 4 unlocked

    Motion

    Ease-out for entrance, ease-in-out for state. 200ms hover, 400–600ms layout. Stagger children at 30–60ms so groups feel intentional, not synchronized.

    Spacing

    Pick one scale (4 or 8) and don't mix. Section padding 96–128px desktop, 48–64px mobile. Headline sits ~24px above the subhead; subhead ~32px above the CTA cluster.

    Pro

    Unlock the rest of the tuning notes.

    Buy Pro
  • Variation 04

    Fullscreen Modal

    aka Page Modal · Full-Window Overlay

    Screenshot of notion.sonotion.so

    A modal that takes the whole viewport. Used when the contained task is dense enough to deserve a page.

    When to use

    Long-form creation tasks: new project, advanced settings, multi-step editors.

    Anatomy

    • Full-viewport overlay with subtle backdrop blur
    • Centered card max-width ~960px
    • Sticky header with close + secondary actions
    • Sticky footer with primary CTA
    • Esc closes; scroll lock on body

    Prompt

    Build a fullscreen modal. The modal covers the viewport with a backdrop blur-xl over the page. Centered inside, a content frame at max-width 960px, max-height 90vh, rounded-2xl, padding 0. Sticky header with title, optional eyebrow, and a close X. Body scrolls inside the frame. Sticky footer at the bottom with ghost Cancel + primary Save. Esc closes; click on backdrop closes. Lock body scroll while open and trap focus.

    Polish & tuning

    2 of 4 unlocked

    Motion

    Ease-out for entrance, ease-in-out for state. 200ms hover, 400–600ms layout. Stagger children at 30–60ms so groups feel intentional, not synchronized.

    Spacing

    Pick one scale (4 or 8) and don't mix. Section padding 96–128px desktop, 48–64px mobile. Headline sits ~24px above the subhead; subhead ~32px above the CTA cluster.

    Pro

    Unlock the rest of the tuning notes.

    Buy Pro
  • Variation 06

    Video Modal

    aka Lightbox Video Player · Watch Modal

    Screenshot of linear.applinear.app

    Click-to-play video modal - youtube/vimeo/native. Opens centered with autoplay and Esc-to-close.

    When to use

    Hero 'Watch the demo' CTAs and embedded explainers on landing pages.

    Anatomy

    • 16:9 player centered
    • Backdrop dims and blurs the page
    • Autoplay on open, paused on close
    • Close X top-right + Esc
    • Captions toggle in the player

    Prompt

    Build a video modal. Centered 16:9 player at max-width 960px, rounded-xl, background black. Backdrop blur over the page. On open, autoplay the video unmuted; on close (X or Esc or backdrop click), pause and reset to 0. Player has standard controls (play, mute, scrubber, captions, fullscreen). Lock body scroll while open and trap focus inside the modal.

    Polish & tuning

    2 of 4 unlocked

    Motion

    Ease-out for entrance, ease-in-out for state. 200ms hover, 400–600ms layout. Stagger children at 30–60ms so groups feel intentional, not synchronized.

    Spacing

    Pick one scale (4 or 8) and don't mix. Section padding 96–128px desktop, 48–64px mobile. Headline sits ~24px above the subhead; subhead ~32px above the CTA cluster.

    Pro

    Unlock the rest of the tuning notes.

    Buy Pro
  • Variation 07

    Stacked Modals

    aka Nested Modals · Sub-Modal Stack

    Screenshot of linear.applinear.app

    Multiple modals layered on top of each other. Esc dismisses one at a time, never all at once.

    When to use

    Sparingly. Stack depth above 2 is a smell. Useful for confirm-before-delete inside an edit modal.

    Anatomy

    • Backdrop on each layer dims further
    • Top modal traps focus exclusively
    • Esc closes only the top modal
    • Maximum depth enforced (2)

    Prompt

    Build a stacked modal pattern. The modal manager keeps a stack of open modals. Each new modal renders above the previous, with an additional dimming backdrop layer beneath it. Esc pops only the top modal. Focus is trapped within the top-most modal exclusively. Enforce a max stack depth of 2. Additional opens replace the top of the stack. Animate enter/exit with a subtle scale + fade.

    Polish & tuning

    2 of 4 unlocked

    Motion

    Ease-out for entrance, ease-in-out for state. 200ms hover, 400–600ms layout. Stagger children at 30–60ms so groups feel intentional, not synchronized.

    Spacing

    Pick one scale (4 or 8) and don't mix. Section padding 96–128px desktop, 48–64px mobile. Headline sits ~24px above the subhead; subhead ~32px above the CTA cluster.

    Pro

    Unlock the rest of the tuning notes.

    Buy Pro
  • Variation 08

    Product Tour Modal

    aka Coachmark Modal · Onboarding Tooltip

    Screenshot of linear.applinear.app

    A multi-step coachmark that highlights parts of the UI with positioned tooltips and progress dots.

    When to use

    First-time experience after signup, or when a major UI change ships. Always offer a 'Skip tour' escape.

    Anatomy

    • Spotlight cutout reveals the target element
    • Positioned tooltip beside the target
    • Step counter + Next/Skip controls
    • Backdrop dims everything except the target

    Prompt

    Preview · Pro to copy
    Pro

    Unlock the full prompt.

    Buy Pro

    Polish & tuning

    2 of 4 unlocked

    Motion

    Ease-out for entrance, ease-in-out for state. 200ms hover, 400–600ms layout. Stagger children at 30–60ms so groups feel intentional, not synchronized.

    Spacing

    Pick one scale (4 or 8) and don't mix. Section padding 96–128px desktop, 48–64px mobile. Headline sits ~24px above the subhead; subhead ~32px above the CTA cluster.

    Pro

    Unlock the rest of the tuning notes.

    Buy Pro
  • Variation 09

    Payment Modal

    aka Checkout Modal · Stripe Element Modal

    Screenshot of linear.applinear.app

    Inline checkout modal. Stripe Elements + a single 'Pay' button, no full-page redirect.

    When to use

    Subscription upgrades, one-off purchases, paid features. Smoother than redirecting to Checkout when you want context preserved.

    Anatomy

    • Plan summary at the top (name, price, period)
    • Stripe Payment Element
    • Single 'Pay' button at the bottom
    • Inline error display
    • Loading state during confirmCardPayment

    Prompt

    Preview · Pro to copy
    Pro

    Unlock the full prompt.

    Buy Pro

    Polish & tuning

    2 of 4 unlocked

    Motion

    Ease-out for entrance, ease-in-out for state. 200ms hover, 400–600ms layout. Stagger children at 30–60ms so groups feel intentional, not synchronized.

    Spacing

    Pick one scale (4 or 8) and don't mix. Section padding 96–128px desktop, 48–64px mobile. Headline sits ~24px above the subhead; subhead ~32px above the CTA cluster.

    Pro

    Unlock the rest of the tuning notes.

    Buy Pro
  • Variation 10

    Share Modal

    aka Permissions Modal · Invite & Share

    Screenshot of figma.comfigma.com

    A modal for sharing a resource. Copyable link, role picker, collaborators list, role-per-person.

    When to use

    Docs, files, projects. Anywhere a shareable URL exists. The Figma-style share modal is the canonical example.

    Anatomy

    • Email invite input + role picker
    • Collaborator list with per-row role select
    • Public link row with sharing-level select
    • Copy link button with feedback toast

    Prompt

    Build a share modal. Header: 'Share this project'. Body sections: (1) Invite by email. Input with multi-tag entry + role select (Editor/Viewer) + Send. (2) People with access. List of avatars + name + email + per-row role select + remove. (3) Public link. Toggle 'Anyone with the link' + level select (View/Comment/Edit) + 'Copy link' button that shows a check icon for 1.5s after click. Modal width 520px. Esc closes.

    Polish & tuning

    2 of 4 unlocked

    Motion

    Ease-out for entrance, ease-in-out for state. 200ms hover, 400–600ms layout. Stagger children at 30–60ms so groups feel intentional, not synchronized.

    Spacing

    Pick one scale (4 or 8) and don't mix. Section padding 96–128px desktop, 48–64px mobile. Headline sits ~24px above the subhead; subhead ~32px above the CTA cluster.

    Pro

    Unlock the rest of the tuning notes.

    Buy Pro