modal-drawer-system

Generate accessible modal and drawer components with focus management and ARIA compliance.

5|Updated Dec 31, 2025
One-click install
npx skills add https://github.com/patricio0312rev/skillset --skill modal-drawer-system-patricio0312rev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: modal-drawer-system
Source: https://github.com/patricio0312rev/skillset/tree/main/templates/frontend/modal-drawer-system
Command: npx skills add https://github.com/patricio0312rev/skillset --skill modal-drawer-system-patricio0312rev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Accessible, keyboard-friendly modal and drawer components are often hard to implement with correct focus management, ARIA attributes, and smooth UX.

Core Features & Use Cases

  • Focus trapping, ESC-to-close, portal rendering, and scroll-lock to ensure a polished UX across modals, dialogs, drawers, and overlays.
  • Sample implementations for common use cases like confirmation dialogs and detail views to accelerate UI development.

Quick Start

Run the modal-drawer-system generator to scaffold accessible modal and drawer components in your project.

Frequently Asked Questions about modal-drawer-system

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build accessible modals and drawers with proper focus trapping?

To build accessible modals and drawers with focus trapping, use a system that applies portal rendering, ARIA compliance, and scroll locking to manage keyboard navigation and predictable focus behavior across overlay components.

What is focus trapping and how does it work for web dialog components?

Focus trapping for web dialog components ensures keyboard navigation cycles only within the open modal or drawer, using ARIA attributes and portal rendering to prevent users from tabbing to background elements while the overlay is active.

How do I implement ESC-to-close and scroll lock for side drawers and bottom sheets?

Implementing ESC-to-close and scroll lock for side drawers and bottom sheets requires applying keyboard event handlers for the escape key and disabling background page scrolling while the overlay portal is rendered.

Can I use this modal and drawer system for both center modals and bottom sheets?

Yes, you can use this modal and drawer system for center modals, side drawers, and bottom sheets, as it specifies portal rendering, backdrop interactions, and optional header, content, and footer sections for each layout.

What's the best way to structure ARIA attributes for confirmation dialogs?

The best way to structure ARIA attributes for confirmation dialogs is to use a system providing sample implementations that enforce focus management, role definitions, and backdrop interactions to ensure accessible and compliant overlay behavior.

Why does my modal component lose keyboard focus to the background page?

Your modal component loses keyboard focus to the background page when focus trapping and scroll locking are not applied, which requires portal rendering and ARIA-compliant focus management to resolve.