shadcn-impl-responsive-dialog-drawer

Official

Make 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 useMediaQuery based on useSyncExternalStore to avoid hydration mismatches in Next.js.
  • Single open-state + early return: Maintains one open state for both branches and ensures only one modal mounts at a time to avoid duplicate role="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/DialogDescription and DrawerTitle/DrawerDescription are present, and uses DrawerClose asChild to 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 required

Components

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.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.