New to Kendo UI for AngularStart a free 30-day trial

Represents the Kendo UI Drawer component for Angular. Provides a dismissible or permanently visible panel for navigation in responsive web applications.

Definition

Package:@progress/kendo-angular-layout

Selector:kendo-drawer

Export Name:Accessible in templates as #kendoDrawerInstance="kendoDrawer"

Syntax:

TS
@Component({
  selector: 'my-app',
  template: `
    <kendo-drawer-container>
      <kendo-drawer #drawer
        [items]="items"
        mode="overlay"
        [(expanded)]="expanded">
      </kendo-drawer>
      <kendo-drawer-content>
        <button class="k-button" (click)="drawer.toggle()">Open the Drawer</button>
      </kendo-drawer-content>
    </kendo-drawer-container>
  `
})
class AppComponent {
  public expanded = false;
  public items = [
    { text: 'Inbox', icon: 'inbox' },
    { text: 'Notifications', icon: 'bell' }
  ];
}

Inputs

Specifies the animation settings of the Drawer (see example).

Default:

DEFAULT_ANIMATION

Specifies if the Drawer automatically collapses when an item or the overlay is clicked.

Default:

true

expanded

boolean

Specifies the state of the Drawer.

Default:

false

Defines a callback function which determines if an item should be expanded. This is useful for hierarchical data structures where the expansion state of an item depends on its parent or other items.

items

any[]

Defines the collection of items that render in the Drawer.

Default:

[]

mini

boolean

Enables the mini (compact) view of the Drawer which displays when the component is collapsed (see example).

Default:

false

miniWidth

number

Defines the width of the Drawer when the mini view is enabled and the component is collapsed. By default, the mini view width is determined by the used Kendo Theme.

Specifies the mode in which the Drawer displays.

Default:

'overlay'

Specifies the position of the Drawer (see example).

Default:

'start'

width

number

Defines the width of the Drawer when it is expanded.

Default:

240

Events

Fires when the Drawer is collapsed and its animation is complete.

Fires when the Drawer is expanded and its animation is complete.

Fires when the expanded property of the component is updated. Used to provide a two-way binding for the expanded property.

Fires when an item in the Drawer is selected. This event is preventable.

Methods

Toggles the visibility of the Drawer. If the expanded parameter is not provided, the Drawer will toggle between expanded and collapsed states.

Parameters:expanded?boolean

Specifies if the Drawer will be expanded or collapsed.