Skip to content

Conversation

@mdo
Copy link
Member

@mdo mdo commented Dec 11, 2025

Intended to replace Modal in v6, built on <dialog> with reduced JS thanks to browsers. Same functionality, but with new <dialog> element, and thus, a simplified JS plugin.

@mdo mdo requested review from a team as code owners December 11, 2025 17:55
@mdo mdo force-pushed the feature/dialog-component branch from 89df9d6 to 8874a66 Compare December 11, 2025 20:14
@mdo mdo changed the title New Dialog component Replace Modal with new Dialog component Dec 11, 2025
@mdo mdo added this to v6.0.0 Dec 11, 2025
@github-project-automation github-project-automation bot moved this to Inbox in v6.0.0 Dec 11, 2025
mdo added 5 commits December 11, 2025 16:11
New component that leverages the native HTML <dialog> element for modals
and non-modal dialogs with built-in backdrop and accessibility support.

Features:
- Modal dialogs using showModal() with automatic backdrop
- Non-modal dialogs using show() for persistent UI elements
- Static backdrop option (prevents close on outside click)
- Keyboard support (Escape to close, focus trapping for modals)
- Smooth open/close animations via CSS
- Events: show, shown, hide, hidden, hidePrevented
- Data API for toggling with data-bs-toggle="dialog"

JavaScript:
- js/src/dialog.js - Main component class
- js/tests/unit/dialog.spec.js - Unit tests
- js/tests/visual/dialog.html - Visual test page

SCSS:
- scss/_dialog.scss - Component styles

Docs:
- Add dialog component documentation
- Update modal docs with dialog references
@mdo mdo force-pushed the feature/dialog-component branch from 63e14ae to 2b81f2a Compare December 12, 2025 05:07
@twbs twbs deleted a comment from diffray-bot Dec 16, 2025
@mdo mdo merged commit 2f20144 into v6-dev Dec 16, 2025
12 checks passed
@mdo mdo deleted the feature/dialog-component branch December 16, 2025 19:19
@mdo mdo mentioned this pull request Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Inbox

Development

Successfully merging this pull request may close these issues.

2 participants