A persistent slide-out panel docked to the left or right viewport edge, for mobile layouts
where desktop side panels don't fit. Add widgets to content; the drawer lives on
UIRoot.popupLayer above a tap-to-close scrim while open.
Gestures: swiping in from the docked edge (edgeSwipeEnabled, an invisible strip) pulls the
drawer open following the finger; a horizontally-dominant drag on the open drawer slides it
back out (vertical drags pass through, so scroll panes inside keep working); releasing
settles open/closed by velocity, then position. The scrim tap, Escape and the host's Back
handling (via UIRoot.pushOverlayCloser) also close it. open()/close() drive it
programmatically. Unlike UIModal, closing does NOT dispose the drawer — reuse it across
openings and dispose() it with the screen.
Constructor
new(side:UIDrawerSide, width:Float)
Parameters:
side | the viewport edge to dock to |
|---|---|
width | the open drawer's width in UI units |
Variables
Methods
attachEdge():Void
Installs the edge-swipe strip on the current root. Call once after creating the drawer
(and again if the viewport size changes). No-op while edgeSwipeEnabled is false.