Live examples and demonstrations
Off-canvas panels are fixed-position surfaces that slide in from any edge of the viewport.
They are controlled with a single overlay element and two helper functions:
toggleOffCanvas(id) and closeAllOffCanvas().
Get up and running in 5 minutes with our Quick Start Guide!
View Quick Start GuideMarkup pattern
toggleOffCanvas('panelId')id="offCanvasOverlay"class="off-canvas">id="panelId" (matches the trigger call)data-off-canvas="right|left|top|bottom"Theming data attributes
data-off-canvas-bg – panel background colordata-off-canvas-heading – color for headings inside the paneldata-off-canvas-text – color for paragraph textdata-off-canvas-size – optional width/height (e.g. 360px or 50%)data-off-canvas-shadow – optional edge shadow color; use "none" to remove the glow.All content inside the panel can use standard RSL grids and cards — it’s just another container in the layout.
These buttons open off-canvas panels from each edge of the viewport. Each panel contains a small Responsive Slot Layout grid to show how RSL content behaves inside the drawer.
Demo: Panels from All Sides
These buttons open off-canvas panels from each edge of the viewport. Each panel contains a small
Responsive Slot Layout grid to show how RSL content behaves inside the drawer.
aria-hidden to signal visibility.role="dialog", aria-modal="true", and aria-labelledby.Esc closes any open panel via off-canvas.js.