shadcn-impl-responsive-dialog-drawer
OfficialMake one modal that fits every device
AuthorImpertio-Studio
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill prevents brittle, inaccessible responsive modals by providing a production-ready recipe for rendering a single modal surface that becomes a centered Dialog on desktop and a bottom-sheet Drawer on mobile.
Core Features & Use Cases
- SSR-safe responsive switching: Uses an SSR-safe
useMediaQuerybased onuseSyncExternalStoreto avoid hydration mismatches in Next.js. - Single open-state + early return: Maintains one
openstate for both branches and ensures only one modal mounts at a time to avoid duplicaterole="dialog"nodes and focus-trap conflicts. - Shared content component contract: Enforces one shared content component for both surfaces so users never lose inputs or see different field sets across breakpoints.
- Accessible labeling & correct close semantics: Ensures
DialogTitle/DialogDescriptionandDrawerTitle/DrawerDescriptionare present, and usesDrawerClose asChildto avoid nested button HTML and ensure closing works reliably. - Responsive Combobox variant support: Extends the same Popover-on-desktop / Drawer-on-mobile pattern to mobile-safe combobox behavior.
Quick Start
Ask the AI to implement a responsive Edit Profile modal that uses a Dialog on screens at least 768px wide and a Drawer on smaller screens, with one shared form component and an SSR-safe media-query hook.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: shadcn-impl-responsive-dialog-drawer Download link: https://github.com/Impertio-Studio/shadcn-ui-Claude-Skill-Package/archive/main.zip#shadcn-impl-responsive-dialog-drawer Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.