Skip to content

Drawer for Angular

AngularOverlays

Panel that slides in from a screen edge, built on native <dialog>. Modal drawers use showModal() (top layer, inert background, backdrop, scroll lock, focus restoration); non-modal drawers use show() and keep the page interactive. Close reasons and cancelable close events match Dialog.

  • Four edgesSlides in from the start, end, top, or bottom, in three sizes, mirrored in RTL.
  • Modal or notModal drawers make the page inert; non-modal ones let users keep working.
  • Cancelable closeEscape, backdrop, and close button raise a cancel event you can veto.
  • Footer actionsAction buttons close the drawer and report which one was pressed.

Behavior, design tokens, and limitations are described on the Drawer page; this page covers the Angular API.

import { Component, signal } from '@angular/core';
import { AuiButton } from '@absoluteui/angular/button';
import { AuiDrawer } from '@absoluteui/angular/drawer';
@Component({
selector: 'app-orders',
imports: [AuiButton, AuiDrawer],
template: `
<button type="button" auiButton variant="secondary" (click)="filtersOpen.set(true)">Filters</button>
<aui-drawer title="Filters" placement="end" [modal]="false" [open]="filtersOpen()" (closed)="closed()">
<p>Filter controls</p>
</aui-drawer>`,
})
export class OrdersComponent {
readonly filtersOpen = signal(false);
closed(): void {
this.filtersOpen.set(false);
// re-run the query
}
}
Terminal window
npm install @absoluteui/angular @absoluteui/components @absoluteui/core @absoluteui/theme

Setup with provideAbsoluteUI() is covered in Getting started. Styles are included with the component.

import { AuiDrawer } from '@absoluteui/angular/drawer';

Defaults for every instance: provideAbsoluteUIConfig({ components: { drawer: { ... } } }) (see Configuration).

Class AuiDrawer; template reference #ref="auiDrawer".

AbsoluteUI Drawer; the projected content is the body: <aui-drawer title="Filters" [(open)]="filtersOpen">...</aui-drawer>. modal is read once at creation (init-only).

Server rendering: Renders in the browser only; on the server the element stays empty.

Input Type Default Description
title string Required. Accessible name, rendered as the heading.
description string Referenced by aria-describedby.
actions readonly DrawerAction[] Footer buttons; clicking closes with the action value.
modal boolean true true: showModal() with inert background, backdrop and scroll lock. false: show(); background stays interactive (supplementary panels only).
placement DrawerPlacement 'end' Screen edge; start/end follow the writing direction.
size DrawerSize 'md' Inline size for side drawers; maximum block size (capped at 85dvh) for top/bottom.
closeOnEscape boolean true Escape requests close (cancelable) when the drawer is the topmost overlay.
closeOnBackdrop boolean true Backdrop click requests close (cancelable). Modal only.
showCloseButton boolean true Render the header close button.
direction "ltr" | "rtl" 'ltr' Maps start/end placement to a physical edge; applied as the element’s dir.
icons Partial<DrawerIcons> Icon slot overrides.
Model Type Change output Description
[(open)] boolean (openChange) Whether the drawer is shown: [(open)]. Closing by Escape, the close button, or an action sets it to false.
Output Payload Description
(opened) null After the drawer opened. Re-emits aui-open.
(cancelled) DrawerCloseDetail Before a user-initiated close; preventDefault keeps it open. Re-emits aui-cancel.
(closed) DrawerCloseDetail After the drawer closed. Re-emits aui-close.

Pattern: WAI-ARIA APG Dialog (Modal) pattern implemented with native <dialog>.showModal(); non-modal drawers use <dialog>.show() as a non-modal dialog.

The Angular component renders the framework-neutral component, so its keyboard support, roles, WCAG 2.2 criteria, budgets, and import cost apply unchanged: see Drawer: Accessibility and performance.