DrawerComponent
Represents the Kendo UI Drawer component for Angular. Provides a dismissible or permanently visible panel for navigation in responsive web applications.
@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' }
];
}
Selector
kendo-drawer
Export Name
Accessible in templates as #kendoDrawerInstance="kendoDrawer"
Inputs
Name | Type | Default | Description |
---|---|---|---|
animation? |
|
|
Specifies the animation settings of the Drawer (see example). |
autoCollapse |
|
|
Specifies if the Drawer automatically collapses when an item or the overlay is clicked. |
expanded |
|
|
Specifies the state of the Drawer. |
isItemExpanded |
|
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 |
|
|
Defines the collection of items that render in the Drawer. |
mini |
|
|
Enables the mini (compact) view of the Drawer which displays when the component is collapsed (see example). |
miniWidth |
|
|
Defines the width of the Drawer when the mini view is enabled and the component is collapsed. |
mode |
|
|
Specifies the mode in which the Drawer displays. |
position |
|
|
Specifies the position of the Drawer (see example). |
width |
|
|
Defines the width of the Drawer when it is expanded. |
Events
Name | Type | Description |
---|---|---|
collapse |
|
Fires when the Drawer is collapsed and its animation is complete. |
expand |
|
Fires when the Drawer is expanded and its animation is complete. |
expandedChange |
|
Fires when the |
select |
|
Fires when an item in the Drawer is selected. This event is preventable. |
Methods
toggle | ||||||
---|---|---|---|---|---|---|
Toggles the visibility of the Drawer.
If the | ||||||
|