Dojo NG is being built in the open, one section at a time — follow along on Heptapod.

API REFERENCE · OVERLAYS

<dj-slide-pane>

A panel that slides in from an edge. Slots: title, default (content). Closes on Escape, the close button, and underlay click. Locks body scroll while open. Emits dj-close. Width/height comes from width (px). Parts: underlay, pane, title, close, content.

Try it in the playground

@dojo-ng/slide-pane · v0.1.2

npm install @dojo-ng/slide-pane

import "@dojo-ng/slide-pane";

Properties

PropertyAttributeTypeDefault
open open reflected boolean false
align align reflected "left""right""top""bottom" "left"
width width number 320
underlay underlay boolean true
closeText close-text string None

Events

dj-close

Slots

SlotDescription
title
Default slotcontent

CSS parts

Style these with dj-slide-pane::part(name).

underlaypanetitleclosecontent

CSS custom properties

PropertyDefaultDescription
--dj-slide-pane-size320pxWidth (left/right) or height (top/bottom) of the pane.
--dj-slide-pane-z-index931Stacking order of the pane.
--dj-slide-pane-underlay-z-index930Stacking order of the pane underlay (scrim).

Methods

close()