Offcanvas Motion
A soft sheet entrance for Bricks’ own Offcanvas. Bricks keeps running the Offcanvas (toggles, focus, Escape, the backdrop click, the direction per breakpoint, Open on page load); Offcanvas Motion only changes how it moves: a soft sheet, or a two-panel multi-level drawer menu. Free, included in the Bricksify Companion.
Where to find it#
- Element: Elements panel > Bricksify > Offcanvas Motion. It is an Offcanvas with every Bricks control and the sheet entrance switched on.
- Panel: the Offcanvas Motion (Bricksify) group on any native Offcanvas. Nothing changes until you pick the effect; without the Companion the Offcanvas simply slides the Bricks way. The Mini Cart templates use the panel.
Settings#
| Setting | What it does |
|---|---|
| Open / close effect | Sheet: the panel fades in while it travels from its side (the Offcanvas Direction, also per breakpoint) in 0.2s on cubic-bezier(0.4, 0, 0.2, 1); the backdrop fades in 0.1s. Closing plays it backwards. |
| Slide distance | How far the panel travels (default 40px). |
| Backdrop blur | Blur behind the backdrop (default 4px). Its colour is the Backdrop block’s background. |
The Offcanvas Transition: Duration and Timing function controls still apply and override the defaults.
Multi-level drawer#
Pick Multi-level drawer to turn the Offcanvas into a two-panel menu. The Content block becomes a transparent full-screen stage that holds two panels you style with Bricks controls. Panel 1 is clipped open from left to right; hovering (or clicking, or pressing the right arrow on) a category with sub-links opens panel 2 next to it, and its links come in a beat later, one after another. The Backdrop block dims the page and stays clickable to close. Closing is its own quicker movement: the links fade, panel 1 clips back, the backdrop fades. At the drill-down breakpoint and below, panel 2 slides in over panel 1 with a Back button instead. Needs GSAP core, loaded by the Companion.
Build it with native elements, no code. Mark the parts with these classes (Style > CSS classes):
| Class | What it marks |
|---|---|
bxdr-primary | Panel 1 (the first block of the Offcanvas Content if no block has the class). Position, size, background and corner radius are its own Bricks controls; it opens with a left-to-right clip that follows its radius. |
bxdr-secondary | Panel 2 (the second block if absent). Leave it empty: the sub-links of each category are moved into it. |
bxdr-item | A category. Its first button or link is the category; give it a block with the class bxdr-sub to give it sub-links. A category without bxdr-sub is a plain link (hovering it closes panel 2). |
bxdr-sub | The sub-links of a category, nested under it. Links inside a list slide in one after another; anything else (an Explore all link) just appears. |
bxdr-step | Any other content of panel 1 that should slide in after the categories (links, cards). |
| Setting | What it does |
|---|---|
| Open / close effect | Multi-level drawer. |
| Duration (s) | Panel 1 opening, default 0.9. The backdrop fades in over 0.75 of it, the Toggle colour changes over 0.6 of it (from 0.2), the categories start at 0.35 of it and the bxdr-step content at 0.45. Closing takes 0.55 of it. |
| Ease | Curve of the opening, default Expo out. Closing always uses Expo out. |
| Stagger (s) | Gap between one link and the next as they slide in 16px, default 0.06 (categories and sub-links; bxdr-step elements use 70% of it). |
| Hover intent: close delay (ms) | How long panel 2 waits before it closes when the pointer leaves the categories, default 200. |
| Pointer direction | Default Predict: while the pointer moves diagonally towards panel 2 and brushes another category on the way, the open sub-links stay; the choice is re-checked after the hover intent delay. Off switches at once. |
| Drill-down from | Breakpoint at and below which panel 2 slides in over panel 1 (same size and place) with a Back button, opened by a tap. Default Mobile landscape (767px). |
| Back button text | Default Back. |
| Hover dot colour | The dot that pops in (0.4s back.out) before a hovered category or sub-link and pushes its label aside. Default: the link colour. |
| Toggle colour while open | The Toggle outside the Offcanvas that opens it fades to this colour while the drawer is open (white over the dimmed page in the template). Empty: it keeps its colour. |
The Toggle that opens it is a normal Bricks Toggle pointing at the Offcanvas (the Hamburger panel animates it). Give it a z-index above the Offcanvas (1000) so it stays clickable over the backdrop and can close the drawer. Leave the Offcanvas Width and Transition controls empty in this mode.
Keyboard and screen readers. Bricks focuses the first category on open and the Toggle again on close. Tab and Shift+Tab stay inside the drawer and its Toggle. Up and Down move between categories (and between sub-links), Right or Enter opens a category’s sub-links and moves focus into them, Left or Escape goes back to the category, a second Escape closes the drawer. Categories carry aria-expanded and aria-controls; the Toggle gets aria-controls; the open drawer is a modal dialog; the panel that is out of view is inert.
Scrolling. Turn on No scroll (body) to lock the page while the drawer is open. Panels scroll on their own when the screen is short and carry data-lenis-prevent, so the drawer behaves the same with or without smooth scroll.
Reduced motion. Every movement runs 20 times faster, so the drawer simply appears. Without JavaScript the drawer content shows in the page as plain nested lists; without GSAP it opens as a plain Offcanvas with each category’s sub-links under it.
Reduced motion#
With reduced motion the sheet only fades, without travelling; the drawer appears almost at once.
Used in#
Mini Cart Glass Grid, Mini Cart Basket, Mini Cart Suggestions, Mini Cart Top Sheet (sheet); Multi-Level Drawer Menu (multi-level drawer).