# drawer

```ts
import { DrawerModule } from '@anguless/angulux/drawer';
```

## Drawer

`agl-drawer` — component

Inherits every input, output and slot of `BaseComponent` — see [basecomponent.md](basecomponent.md).

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

| Input | Type | Default | Description |
| --- | --- | --- | --- |
| `appendTo` | `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). |
| `motionOptions` | `MotionOptions \| undefined` | _not documented_ | The motion options. |
| `blockScroll` | `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. |
| `styleClass` | `string \| undefined` | _not documented_ | Style class of the component. |
| `ariaCloseLabel` | `string \| undefined` | _not documented_ | Aria label of the close icon. |
| `autoZIndex` | `boolean` | _not documented_ | Whether to automatically manage layering. |
| `baseZIndex` | `number` | _not documented_ | Base zIndex value to use in layering. |
| `modal` | `boolean` | _not documented_ | Whether an overlay mask is displayed behind the drawer. |
| `closeButtonProps` | `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. |
| `showCloseIcon` | `boolean` | _not documented_ | Whether to display the close icon. **Deprecated:** use 'closable' instead. |
| `closeOnEscape` | `boolean` | _not documented_ | Specifies if pressing escape key should hide the drawer. |
| `transitionOptions` | `string` | _not documented_ | Transition options of the animation. **Deprecated:** since v21.0.0. Use `motionOptions` instead. |
| `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". |
| `fullScreen` | `boolean` | `false` | Adds a close icon to the header to hide the dialog. |
| `header` | `string \| undefined` | _not documented_ | Title content of the dialog. |
| `maskStyle` | `{ [klass: string]: any } \| null \| undefined` | _not documented_ | Style of the mask. |
| `closable` | `boolean` | `true` | Whether to display close button. |

| Output | Type | Description |
| --- | --- | --- |
| `onShow` | `EventEmitter<any>` | Callback to invoke when dialog is shown. |
| `onHide` | `EventEmitter<any>` | Callback to invoke when dialog is hidden. |
| `visibleChange` | `EventEmitter<boolean>` | Callback to invoke when dialog visibility is changed. |

| Slot | Read as | Description |
| --- | --- | --- |
| `<ng-template #header>` | `headerTemplate` | Custom header template. |
| `<ng-template #footer>` | `footerTemplate` | Custom footer template. |
| `<ng-template #content>` | `contentTemplate` | Custom content template. |
| `<ng-template #closeicon>` | `closeIconTemplate` | Custom close icon template. |
| `<ng-template #headless>` | `headlessTemplate` | Custom headless template to replace the entire drawer content. |
