Off-canvas
Drawers for filters, carts and mobile menus: an off-canvas panel slides in from the right with a pure CSS transition.
Description
.off-canvas extends the toast styling into a full-height panel anchored to the top right. Opened with the Popover API, it slides in from the right with a discrete transform transition and sits above everything in the top layer.
Padding, slide duration and the drop shadow follow the shared tokens ($gutter, $transition-slow, elevation). The z-index (3333) sits below modals and toasts on purpose. Being a plain .off-canvas class with no custom properties, deeper changes (anchor side, height) are done by overriding the class in your own layer or via the $modules and tokens configuration at build time.
Off-canvas panel
A plain popover attribute gives you light dismiss and Esc closing out of the box; the trigger only needs popovertarget. The full-height panel is ideal for filter lists and secondary content that should not cover the whole page.
<button popovertarget="filters">Filters</button>
<aside id="filters" popover class="off-canvas">
<h3>Filters</h3>
<label>
<input type="checkbox" checked>
In stock
</label>
<label>
<input type="checkbox">
On sale
</label>
<button popovertarget="filters">Apply</button>
</aside>Navigation drawer
An <aside> with a <nav> inside turns the panel into a navigation drawer: the nav module styles the links, and the close button stays within reach. The same pattern covers desktop navigation or secondary menus.
<button popovertarget="menu-drawer">Menu</button>
<aside id="menu-drawer" popover class="off-canvas">
<h3>Site sections</h3>
<nav>
<ul>
<li><a href="#top">Home</a></li>
<li><a href="#products">Products</a></li>
<li><a href="#about">About</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
<button popovertarget="menu-drawer">Close</button>
</aside>Panel with form
Forms keep their native styling inside the panel: labels, checkboxes, selects and a save button, all without extra classes. Closing the popover does not clear the form, so reopening shows the user's choices intact.
<button popovertarget="settings">Settings</button>
<aside id="settings" popover class="off-canvas">
<h3>Settings</h3>
<label>
<input type="checkbox" checked>
Email notifications
</label>
<label>
<input type="checkbox">
Compact view
</label>
<label>
Language
<select>
<option>English</option>
<option>Deutsch</option>
<option>Español</option>
</select>
</label>
<button popovertarget="settings">Save</button>
</aside>