Drawer
NewA little more room for your next idea. Slide details, navigation and actions into view.
Basic
Control visibility with a two-way binding. Click outside or press Escape to close.
YOUR WORKSPACE
Make room for what matters.
Everything you need, just a slide away.
Ready when you are.
Position
Choose the edge that fits your layout.
Size and scrolling
Set width for side drawers and height for top or bottom drawers. Breakpoints adjust the width on smaller screens.
Full screen
Use position="full" when your content needs the whole viewport.
Template
Customize the header, content and footer independently.
Headless
Replace the entire layout and use the provided close callback.
Non-modal
Keep the page interactive while a companion panel is open.
Usage and API
TypeScript
import { signal } from '@angular/core';
import { AvDrawer, AvButton } from 'avero-ui';
// Add AvDrawer and AvButton to your component imports.
readonly visible = signal(false);HTML
<button avButton (click)="visible.set(true)"
aria-controls="workspace-drawer" [attr.aria-expanded]="visible()">Open</button>
<av-drawer inputId="workspace-drawer" header="Workspace"
[(visible)]="visible" position="right" width="480px"
[breakpoints]="{ '640px': '100vw' }">
<p>Your content goes here.</p>
<ng-template #footer let-close="close">
<button avButton (click)="close()">Done</button>
</ng-template>
</av-drawer>Inputs. visible supports two-way binding. Configure inputId, header, ariaLabel, position (left by default), width and height (320px), breakpoints, modal, closable, closeOnEscape and dismissableMask (all true by default). Breakpoints use maximum viewport widths in px; the narrowest match wins.
Templates and events. Use #header, #content, #footer or #headless. Content, footer and headless templates receive a close callback. onShow and onHide report visibility changes; close() dismisses the drawer programmatically.
Accessibility. Native modal dialogs contain keyboard focus and restore it to the trigger on close. Provide header or ariaLabel, and connect your trigger with aria-controls and aria-expanded. Use data-default-focus to choose initial focus. Entry animations respect reduced motion preferences.
Styling. Customize --av-drawer-background, --av-drawer-color, --av-drawer-border, --av-drawer-padding and --av-drawer-mask.