shadcn-syntax-dialog
OfficialBuild accessible shadcn Dialog modals correctly.
Software Engineering#a11y#react-hook-form#portal#radix-ui#shadcn-dialog#controlled-state#form-submit
AuthorImpertio-Studio
Version1.0.0
Installs0
System Documentation
What problem does it solve?
shadcn Dialog patterns fail in predictable ways (frozen dialogs, missing accessible titles, portal/z-index bugs, and form-submit close timing), leaving users with broken UX or critical accessibility issues.
Core Features & Use Cases
- Controlled vs uncontrolled correctness: Ensures you always pair
openwithonOpenChange, or usedefaultOpenfor one-shot dialogs. - Accessible DialogTitle enforcement: Prevents critical a11y failures by requiring
DialogTitle(including sr-only patterns) and optionallyaria-describedby={undefined}when you omitDialogDescription. - Portal and stacking-context safety: Keeps dialog overlay/content rendering above the app chrome by relying on
<DialogContent>’s internalDialogPortal(or usingDialogPortal containeronly when truly needed). - Safe closing behavior with forms: Guides you to close only after successful submit (so validation errors keep the dialog open).
- Robust Slot/asChild usage: Avoids
DialogClose asChildmulti-child and ref/prop swallowing issues by requiring a single proper focusable child.
Quick Start
Use the shadcn-syntax-dialog skill to implement a controlled Dialog with DialogTitle, correct portal rendering via DialogContent, and a form-submit handler that closes the dialog only after successful validation.
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-syntax-dialog Download link: https://github.com/Impertio-Studio/shadcn-ui-Claude-Skill-Package/archive/main.zip#shadcn-syntax-dialog 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.