modal-and-overlay-patterns

Featured

Overlays — modals, drawers, bottom sheets, popovers — interrupt or augment the main flow. Each type has a different scope, blocking level, and appropriate use case. Use when designing dialogs, confirmation prompts, side panels, action sheets, or any UI element that appears above the main content layer.

AI & Automation 61 stars 10 forks Updated today MIT

Install

View on GitHub

Quality Score: 88/100

Stars 20%
60
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Modal and Overlay Patterns Overlays appear above the main content layer. They range from lightweight popovers (non-blocking, anchored to a trigger) to full blocking modals (require a user response before the app continues). Choosing the right overlay type for the task prevents unnecessary interruption and keeps the user oriented. --- ## The Overlay Hierarchy Choose the lightest type that satisfies the task. Heavier overlays carry higher cognitive cost. | Type | Blocks background | Anchored to trigger | Typical content | Dismiss with | |---|---|---|---|---| | **Tooltip** | No | Yes | 1–2 lines of explanatory text | Cursor leave / focus out | | **Popover** | No | Yes | Short interactive content: a form field, a picker, a small list | Click outside, Escape, explicit close | | **Dropdown / Menu** | No | Yes | List of actions or options | Click outside, Escape, selection | | **Bottom sheet** (mobile) | Partial (dimmed) | No | Actions or content on small screens | Swipe down, tap scrim, Escape | | **Drawer / Side panel** | Partial (dimmed) | No | Secondary editing, detail views, long forms | Escape, explicit close; optionally click scrim | | **Dialog / Modal** | Yes (full scrim) | No | Blocking task: confirm action, fill required form | Escape (non-destructive only), explicit button | | **Full-screen overlay** | Yes (complete) | No | Immersive task: media viewer, complex configuration | Explicit close only | **Decision rule:** If the user can continue using the rest of the ...

Details

Author
dembrandt
Repository
dembrandt/dembrandt-skills
Created
5 months ago
Last Updated
today
Language
JavaScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

Web & Frontend Listed

overlay-mechanics

The load-bearing details behind modals, drawers, sheets, popovers and menus — which overlay Escape closes when they stack, refcounted scroll locking that finds the page's real scroll frame, compensating the scrollbar gutter so the layout doesn't jump, capping and flipping an anchored popover against its nearest clipping ancestor rather than the viewport, and scoping the mobile viewport scale lock so it doesn't break pinch-zoom. Use when building or fixing a modal, drawer, bottom sheet, dropdown, command palette or tooltip, when the page scrolls behind an overlay, when content shifts sideways as a dialog opens, when Escape closes the wrong thing, or when a menu is clipped or runs off screen. For the animation of overlays use an animation skill.

0 Updated 1 weeks ago
jaeel29
AI & Automation Listed

platform-blocks-feedback-overlays

Show feedback and overlays with the @platform-blocks/ui React Native library. Use when raising notifications with Toast/ToastProvider/useToast, opening modals, bottom sheets or confirm prompts with Dialog/DialogProvider/useDialog/useSimpleDialog, attaching anchored overlays (Popover, Menu/MenuDropdown/MenuItem, Tooltip, ContextMenu), rendering inline messages with Alert, or showing loading and progress state (Loader, LoadingOverlay, Overlay, Progress, Ring, Skeleton), including open-state management with useDisclosure.

0 Updated 4 weeks ago
platform-blocks
AI & Automation Listed

popovers-tooltips

Use when building or fixing popovers, tooltips, dropdowns, menus, comboboxes, or any floating/overlay UI — especially when they render off-screen, get clipped, or are mis-positioned. Covers Floating UI in a Stimulus controller (Rails/Hotwire), Tippy/Flowbite/Preline, and the native Popover API.

0 Updated today
mickzijdel