New to Kendo UI for Vue? Start a free 30-day trial

Drawer

Component

Represents the Kendo UI for Vue Drawer component. Accepts properties of type DrawerProps.

Definition

Package:@progress/kendo-vue-layout

Properties Interface:DrawerProps

Syntax:

vue
<Drawer
    :expanded="expanded"
    :mode="'push'"
    :position="'start'"
    :mini="true"
    :width="240"
    :items="[
        { text: 'Dashboard', svgIcon: gridIcon, selected: true },
        { text: 'Patients', svgIcon: userIcon },
        { separator: true },
        { text: 'Appointments', svgIcon: calendarIcon }
    ]"
    @select="onSelect"
>
    <DrawerContent>Selected page content</DrawerContent>
</Drawer>

Properties

Sets the animation settings of the Drawer. Set a boolean value to turn the default animation on or off. Set a DrawerAnimation object to use a slide animation with a custom duration in milliseconds.

Default:

true

dir?

string

Sets the dir HTML attribute of the Drawer. Use it to switch between LTR and RTL.

Default:

ltr

expanded?

boolean

Sets if the Drawer is expanded (see example).

Default:

false

Overrides the default component that renders a single item (see example).

The default component is: DrawerItem.

Sets the collection of items that the Drawer renders (see example).

Default:

[]

mini?

boolean

Turns on the mini (compact) view of the Drawer. The Drawer shows the mini view when it is collapsed (see example).

Default:

false

Sets the width of the Drawer in pixels when the mini view is on and the Drawer is collapsed.

Default:

50

mode?

string

Sets the mode in which the Drawer shows (see example). The supported values are overlay and push.

Default:

overlay

Object | Function | String

Sets a custom template for the navigation part of the Drawer (see example). When you set it, the template replaces the default DrawerItem rendering. By default, the Drawer has no custom navigation template.

Object | Function | String

Sets a custom footer for the Drawer (see example). The Drawer renders the footer below the items. By default, the Drawer has no footer.

Object | Function | String

Sets a custom header for the Drawer (see example). The Drawer renders the header above the items. By default, the Drawer has no header.

onOverlayclick?

(event: any) => void

Fires when the user clicks the overlay. The Drawer fires this event only in overlay mode.

Parameters:eventany

Fires when the user selects a Drawer item.

Parameters:eventDrawerSelectEvent

position?

string

Sets the position of the Drawer (see example). The supported values are start and end.

Default:

start

tabIndex?

number

Sets the tabIndex attribute of the Drawer.

width?

number

Sets the width of the Drawer in pixels when it is expanded.

Default:

240