FleetbaseFleetbase

Drawer

<Drawer> is a bottom-anchored, height-resizable panel — used for inline detail views, secondary editors, and tray-style UIs.

<Drawer>

<Drawer> is a bottom-anchored panel with a draggable handle. The user can resize it vertically by dragging the gutter, and optionally double-click a notch to minimize. Used for inline detail views and tray-style UIs.

For a full-screen-edge slide-out panel, use <Overlay>.

Basic Usage

<Drawer
  @isOpen={{this.editorOpen}}
  @isResizable={{true}}
  @notchEnabled={{true}}
  @onClose={{fn (mut this.editorOpen) false}}
  as |drawer|
>
  <h2>Edit Notes</h2>
  <textarea>{{this.notes}}</textarea>
  <Button @text="Close" @onClick={{drawer.close}} />
</Drawer>

Arguments

ArgumentTypeDefaultDescription
@isOpenbooleantrueInitial open state
@isResizablebooleanfalseAllow vertical drag-resize via the gutter
@notchEnabledbooleanfalseShow the draggable notch on the gutter — double-click toggles minimize
@noBackdropbooleanfalseDon't render the backdrop
@fullHeightbooleanfalseOpen at full viewport height
@heightstringInitial height (e.g. "400px")
@minResizeHeightnumberMinimum resize height
@maxResizeHeightnumberMaximum resize height
@overlayClassstringExtra classes on the outer wrapper
@containerClassstringExtra classes on the panel container

Callbacks

ArgumentSignatureDescription
@onOpen / @onClose / @onToggle(api)State change callbacks
@onResize / @onResizeStart / @onResizeEnd({ event, drawerPanel })Resize lifecycle
@onMinimize()Called when the user double-clicks the notch

Yielded API

The drawer yields a context object: { toggle, open, close, minimize, isOpen, isMinimized }.

Source

Drawer | Fleetbase