@anguless/angulux/drawer
Drawer
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-drawerSidebar is a panel component displayed as an overlay at the edges of the screen.
| Input | Type | Default | Description |
|---|---|---|---|
| append | HTMLElement | 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). |
| motion | MotionOptions | undefined | not documented | The motion options. |
| block | boolean | not documented | Whether to block scrolling of the document when drawer is active. |
| style | { [klass: string]: any } | null | undefined | not documented | Inline style of the component. |
| style | string | undefined | not documented | Style class of the component. |
| aria | string | undefined | not documented | Aria label of the close icon. |
| auto | boolean | not documented | Whether to automatically manage layering. |
| base | number | not documented | Base zIndex value to use in layering. |
| modal | boolean | not documented | Whether an overlay mask is displayed behind the drawer. |
| close | ButtonProps | not documented | Used to pass all properties of the ButtonProps to the Button component. |
| dismissible | boolean | not documented | Whether to dismiss drawer on click of the mask. |
| show deprecated — use 'closable' instead. | boolean | not documented | Whether to display the close icon. |
| close | boolean | not documented | Specifies if pressing escape key should hide the drawer. |
| transition deprecated — since v21.0.0. Use `motionOptions` instead. | string | not documented | Transition options of the animation. |
| visible | boolean | 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". |
| full | boolean | false | Adds a close icon to the header to hide the dialog. |
| header | string | undefined | not documented | Title content of the dialog. |
| mask | { [klass: string]: any } | null | undefined | not documented | Style of the mask. |
| closable | boolean | true | Whether to display close button. |
| Output | Type | Description |
|---|---|---|
| on | EventEmitter<any> | Callback to invoke when dialog is shown. |
| on | EventEmitter<any> | Callback to invoke when dialog is hidden. |
| visible | EventEmitter<boolean> | Callback to invoke when dialog visibility is changed. |
| Template slot | Description |
|---|---|
| <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| Input | Type | Default | Description |
|---|---|---|---|
| dt | Object | undefined | undefined | Defines scoped design tokens of the component. |
| unstyled | boolean | undefined | undefined | Indicates whether the component should be rendered without styles. |
| pt | PT | undefined | undefined | Used to pass attributes to DOM elements inside the component. Keys become attributes, and a key that names a DOM property is also assigned to that property. Values the browser would execute go through Angular's sanitizer first, as in a template binding: markup in `innerHTML`, `outerHTML` and `srcdoc`, and URLs in `href`, `src`, `action`, `formaction` and `xlink:href`. To write one of those unsanitized on purpose, pass a `DomSanitizer.bypassSecurityTrustHtml` or `bypassSecurityTrustUrl` value. An `on*` key must be a function, and any other value for it is ignored. Keys themselves are applied as given, so let data from users choose values, never keys. |
| pt | PassThroughOptions | undefined | undefined | Used to configure passthrough(pt) options of the component. |