Dialog
A modal overlay for a focused task or short form, with a title and a clear way to close.
Paste this into your agent.
Dialog pulls people off the page to finish one task, such as renaming a project or inviting a member. It traps focus and blocks the page until it closes. Long content scrolls inside while the header and footer stay put.
Install
bashnpx shadcn@4.18.0 add @siteplane/dialog
Import it from @/siteplane/components/dialog. The project needs Siteplane UI's one-time setup first: .
When to pick it
- vs : Pick Alert Dialog instead for a yes-or-no decision, such as a delete confirmation, that must be answered before continuing.
- vs : Pick Sheet instead for a longer form that slides in from an edge and keeps more of the page context visible.
- vs : Pick Popover instead for light, non-modal content anchored to its trigger.
- vs : Pick Drawer instead on mobile when the panel should come from an edge and close with a swipe.
Rules
- Include DialogTitle, plus DialogDescription when it helps, so assistive technology can name the dialog.
- DialogPopup includes a portal and backdrop; don't add another around it.
- Never wrap a submit button in DialogClose; close the dialog yourself after the submission succeeds.
- Use open and onOpenChange when a menu item or other code opens the dialog, and render it outside that menu.
- Put long content in DialogPanel so it scrolls between the header and footer.
- Pick a width with size on DialogPopup, using md or lg for two-column forms or wide tables.
Reference
Add to your agent
Print this skill from the terminal, or connect the whole catalog over MCP. Setup guides
CLI
MCP server
Questions
Related skills
Accessible Focus Statesby UI Skillbook
Keep a visible, high-contrast focus indicator on every interactive element, without a generic browser outline or none at all.
Accessibility
Better Accessibilityby jakubkrehel
Review and improve focus states, keyboard support, ARIA, forms, screen readers, hit areas, and motion accessibility.
AccessibilityExternalGitHub stars: 9.2K
Build Primitiveby PrototyperAI
Build foundational UI primitives from scratch with strong ARIA, keyboard, focus, and state handling.
AccessibilityExternalGitHub stars: 7
Link Purposeby AccessLint
Compatibility listing for link-purpose installs from AccessLint's marketplace skill set.
AccessibilityExternalGitHub stars: 114