Off Canvas Examples

Live examples and demonstrations

Off-Canvas Overview

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().

New to Off-Canvas Panels?

Get up and running in 5 minutes with our Quick Start Guide!

View Quick Start Guide

Markup pattern

  • A trigger that calls toggleOffCanvas('panelId')
  • A shared overlay with id="offCanvasOverlay"
  • One or more panels with:
    • 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 color
  • data-off-canvas-heading – color for headings inside the panel
  • data-off-canvas-text – color for paragraph text
  • data-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.

Download RSL Example Pack

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.

Trigger Buttons • HTML

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.

Off-Canvas Overlay & Panels • HTML















                            

♿ Accessibility Quick Notes