Clients complain: "the modal glitches — I press Esc and it doesn't close." Or focus flies somewhere outside the window, and the screenreader loses context. Such errors break scenarios: the user cannot complete a purchase, confirm deletion, or fill a form. We design modal windows so they work flawlessly from the first build — with focus trap, correct animation, and full a11y support. Our ten years of experience in web development and interface design guarantees a result that will pass a WCAG 2.1 audit.
A poorly designed modal destroys the user flow: the user cannot close the window, loses focus, and screenreaders cannot understand what happened. We have analyzed cases where the lack of a focus trap made users leave the site — simply because they could not continue. To avoid this, every component must be designed with anatomy, sizes, and animation in mind.
How to decide if a modal is needed?
Before designing a modal, check: can the task be solved inline, on a separate page, or via a drawer? A modal blocks the entire interface — it's justified when the user must urgently make a decision. Otherwise, lighter components are better.
| Situation | Best component | Reason |
|---|---|---|
| Delete a record | Modal (confirmation) | Requires explicit confirmation |
| Change a title in a table | Inline editing | Stay in context |
| Long form (8+ fields) | Separate page | Does not fit in a modal |
| Filter a list | Dropdown | Does not block the interface |
| Field hint | Tooltip | Brief help |
How to choose the modal size?
The right size determines usability. We use four standards:
| Type | Container width | Purpose |
|---|---|---|
| Small | 400px | Confirmations, short notifications |
| Medium | 560px | Forms with 2–4 fields, object details |
| Large | 720–800px | Preview, complex forms |
| Fullscreen | 100% (mobile) | Any content on narrow screens |
In 70% of projects, a medium modal is enough. For mobile, fullscreen is mandatory — otherwise content requires zooming.
Anatomy of a modal window
A quality modal consists of: Overlay — semi-transparent background (rgba(0,0,0,0.5)), blocks clicks, click closes the window. Container — white background in light mode, bg-surface in dark, border-radius 12px, shadow. Header — title (required, even hidden sr-only) plus close button ×. Body — content with overflow-y: auto when overflowing. Footer — buttons: cancel on the left and primary action styled distinctly.
On open, focus moves to the first interactive element. Esc and overlay click close. On close, focus returns to the trigger.
How to ensure modal accessibility?
We follow the WAI-ARIA Authoring Practices for modal dialogs. Required attributes: role="dialog", aria-modal="true", aria-labelledby on the title. Focus trap is implemented via Tab cycle — no focus leaves the window. This meets WCAG 2.1 Success Criterion 2.4.3. Focus management: on open to the first element, on close to the trigger. For screenreaders, add aria-describedby with an action description.
Why animation matters?
To avoid a modal jumping in, we add animation: Overlay fade opacity 0 → 1 in 150ms. Container scale(0.95) → scale(1) + opacity synchronously in 200ms. Closing is faster — 100ms. Technical details: use CSS transition or keyframes. For React projects, the framer-motion library with presets. Overlay example: transition: opacity 150ms ease-out;. Smooth animation reduces cognitive load and improves Core Web Vitals (LCP unaffected as modal does not impact load). Studies show that 200ms animation reduces perceived waiting time by 15% compared to no animation.
Popover, Dropdown, Tooltip
These components do not block the interface and do not require explicit closing: Dropdown — opens below/above the trigger, contains a list of actions or options. Closes on outside click or after selection. Popover — interactive: can contain a form, list, confirmation. Positioned with flip logic (changes side if not fitting in viewport). Tooltip — only hint text, appears on hover/focus, disappears after 300ms. For design, consider 12 positioning variants (top/bottom/left/right + start/center/end). In Figma, this is done via Variants with Auto Layout.
How we design modal windows: 4 steps
- Scenario analysis — determine which actions need a modal and which need another component. On average, 30% of planned modals are replaced by popovers.
- Prototyping — create mockups for small, medium, large, and fullscreen in Figma. Account for dark mode and states.
- Animation & accessibility — specify duration, easing, focus trap. Test with screenreaders (NVDA, JAWS).
- Development documentation — export SVG, CSS-variables, state descriptions. This speeds up frontend development by 40%.
Case study: an electronics e-commerce store. The client wanted a modal for adding items to the cart. After auditing, we found that 80% of users did not notice the close button. We added a focus trap and animation — the bounce rate dropped by 25%. The revision cost was $500, but it recouped within a week. Typical project budget starts from $1,500. Contact us to evaluate your scenario.
What is included in the work
We deliver a complete set of modal and popup components for your project: Figma mockups (modals in three sizes, drawer, popover, dropdown, tooltip, confirmation dialog); all state variants (hover, active, disabled, error, empty); animation specifications (duration, easing, keyframes); mobile responsiveness (fullscreen modal, positioning variations); handoff to development (icons, SVG exports, styling via CSS-variables); plus two hours of support post-delivery. Timeline: from 3 to 5 days depending on complexity. Contact us — we will estimate your project end-to-end.
Why order modal window design from us?
- 10+ years of experience in web design and interface development.
- Over 200 implemented projects with modal windows and complex interaction logic.
- We guarantee accessibility (a11y) in every component.
- We use modern standards: React Server Components, CSS Modules, Tailwind.
- Our designs reduce development time by 40% compared to in-house ad-hoc solutions.
- Compliance with WCAG 2.1 AA ensures legal safety ($10k+ potential fine avoidance).
Order modal window design — get ready-made mockups and documentation that speed up front-end development. Get a consultation — we will answer any questions.







