Welcome to Vanilla Breeze
This bell pulls live notifications from /go/notify/messages — the same contract documented at /docs/concepts/service-contracts/. Static articles like this one are the no-JS / no-backend fallback.
This bell pulls live notifications from /go/notify/messages — the same contract documented at /docs/concepts/service-contracts/. Static articles like this one are the no-JS / no-backend fallback.
Slide-in panel using the native <dialog> element with data-position. Zero custom CSS — everything comes from the canonical dialog styles.
A drawer is a dialog that slides in from the side of the screen. In Vanilla Breeze any <dialog> with data-position automatically gains drawer geometry, slide-in animation, and reduced-motion handling. You inherit everything native <dialog> provides: focus trapping, Esc to close, role="dialog", and a proper backdrop.
Key features:
<dialog> with focus trapping and Esc to closestart, end, top, or bottom<section> with overscroll containment built inA right-side drawer with header, scrollable body, and footer actions. Uses the Invokers API to open and close — no event handlers to wire up.
<button commandfor="drawer" command="show-modal">Open Drawer</button> <dialog id="drawer" data-position="end"> <header> <h2>Drawer Title</h2> <button commandfor="drawer" command="close" class="ghost icon-only" aria-label="Close"> <icon-wc name="x"></icon-wc> </button> </header> <section> <p>Drawer content slides in from the side. This body scrolls independently.</p> </section> <footer> <button commandfor="drawer" command="close" class="secondary">Cancel</button> <button type="button" class="primary">Save</button> </footer></dialog>
A left-side drawer for mobile navigation. Use data-position="start" for conventional left-side navigation.
<button commandfor="nav-drawer" command="show-modal">Menu</button> <dialog id="nav-drawer" data-position="start"> <header> <h2>Navigation</h2> <button commandfor="nav-drawer" command="close" class="ghost icon-only" aria-label="Close"> <icon-wc name="x"></icon-wc> </button> </header> <section> <nav> <ul> <li><a href="/">Home</a></li> <li><a href="/about/">About</a></li> <li><a href="/products/">Products</a></li> <li><a href="/contact/">Contact</a></li> </ul> </nav> </section></dialog>
Four edges are supported out of the box. See Dialog › Drawer Variants for the full attribute table and bottom-sheet drag gestures.
| Value | Slides from | Use Case |
|---|---|---|
data-position="end" |
Right (in LTR) | Settings, details, filters |
data-position="start" |
Left (in LTR) | Navigation, sidebars |
data-position="bottom" |
Bottom | Mobile action sheets, share menus |
data-position="top" |
Top | Banners, announcements |
.drawer class or redefining these rules will drift and break theme overrides.<section> for the body. VB pins overflow-y: auto and overscroll-behavior: contain on dialog[data-position] > section so scrolling inside the drawer never bubbles to the page.min(90vw, 28rem) for side drawers. Override on a per-drawer basis with a local class if you need a wider panel.dialog.addEventListener('click', e => e.target === dialog && dialog.close()) if needed.--motion-enter-duration, --ease-out) and automatically collapse to a fade for prefers-reduced-motion.Canonical dialog + drawer styles. Start here.
Centered modal patterns
Mobile action menus and share sheets