Skip to content
angulux
@anguless/angulux/drawer

drawer

1 declarations3 demos
import
import { DrawerModule } from '@anguless/angulux/drawer';

Basic

Visibility is controlled by the visible property and its visibleChange output.

<agl-button icon="pi pi-bars" label="Open" (onClick)="visible.set(true)" /><agl-drawer header="Drawer" [visible]="visible()" (visibleChange)="visible.set($event)">    <p>Content of the drawer.</p></agl-drawer>

Position

Position decides which edge the drawer comes from.

<agl-button label="Left" (onClick)="open('left')" /><agl-button label="Right" (onClick)="open('right')" /><agl-button label="Top" (onClick)="open('top')" /><agl-button label="Bottom" (onClick)="open('bottom')" /><agl-drawer header="Drawer" [visible]="visible()" (visibleChange)="visible.set($event)" [position]="position()">    <p>Position decides which edge it comes from.</p></agl-drawer>

Full screen

A full-screen drawer covers the viewport instead of one edge of it.

<agl-button label="Full screen" (onClick)="visible.set(true)" /><agl-drawer header="Drawer" [visible]="visible()" (visibleChange)="visible.set($event)" [fullScreen]="true">    <p>A full-screen drawer covers the viewport.</p></agl-drawer>

API

Generated from the committed corpus, which check:corpus holds to the built library.

Drawer

componentagl-drawer

Sidebar is a panel component displayed as an overlay at the edges of the screen.

InputTypeDefaultDescription
appendToHTMLElement | ElementRef | TemplateRef<any> | 'self' | 'body' | null | undefined | any 'self' Target element to attach the overlay, valid values are "body" or a local ng-template variable of another element (note: use binding with brackets for template variables, e.g. [appendTo]="mydiv" for a div element having #mydiv as variable name).
motionOptionsMotionOptions | undefinednot documentedThe motion options.
blockScrollbooleannot documentedWhether to block scrolling of the document when drawer is active.
style{ [klass: string]: any } | null | undefinednot documentedInline style of the component.
styleClassstring | undefinednot documentedStyle class of the component.
ariaCloseLabelstring | undefinednot documentedAria label of the close icon.
autoZIndexbooleannot documentedWhether to automatically manage layering.
baseZIndexnumbernot documentedBase zIndex value to use in layering.
modalbooleannot documentedWhether an overlay mask is displayed behind the drawer.
closeButtonPropsButtonPropsnot documentedUsed to pass all properties of the ButtonProps to the Button component.
dismissiblebooleannot documentedWhether to dismiss drawer on click of the mask.
showCloseIcon
deprecated — use 'closable' instead.
booleannot documentedWhether to display the close icon.
closeOnEscapebooleannot documentedSpecifies if pressing escape key should hide the drawer.
transitionOptions
deprecated — since v21.0.0. Use `motionOptions` instead.
stringnot documentedTransition options of the animation.
visibleboolean false The visible property is an input that determines the visibility of the component.
position'left' | 'right' | 'bottom' | 'top' | 'full' 'left' Specifies the position of the drawer, valid values are "left", "right", "bottom" and "top".
fullScreenboolean false Adds a close icon to the header to hide the dialog.
headerstring | undefinednot documentedTitle content of the dialog.
maskStyle{ [klass: string]: any } | null | undefinednot documentedStyle of the mask.
closableboolean true Whether to display close button.
OutputTypeDescription
onShowEventEmitter<any>Callback to invoke when dialog is shown.
onHideEventEmitter<any>Callback to invoke when dialog is hidden.
visibleChangeEventEmitter<boolean>Callback to invoke when dialog visibility is changed.
Template slotDescription
<ng-template #header>Custom header template.
<ng-template #footer>Custom footer template.
<ng-template #content>Custom content template.
<ng-template #closeicon>Custom close icon template.
<ng-template #headless>Custom headless template to replace the entire drawer content.

Inherited from BaseComponent

inherited
InputTypeDefaultDescription
dtObject | undefined undefined Defines scoped design tokens of the component.
unstyledboolean | undefined undefined Indicates whether the component should be rendered without styles.
ptPT | undefined undefined Used to pass attributes to DOM elements inside the component. TRUSTED INPUT ONLY. Whatever you put here is applied to the DOM as given: keys become attributes, and a key that names a DOM property is assigned to that property directly, with no sanitizer in between. That is what makes the API useful, and it means a value reaching it from a user, a database or a CMS can execute script. Treat it like markup you wrote yourself, not like data you received.
ptOptionsPassThroughOptions | undefined undefined Used to configure passthrough(pt) options of the component.