• Introduction
  • Getting Started
  • Vue 2 End of Support
  • Native Components
    • Animation
    • Buttons
    • Chartsupdated
    • Conversational UInew
    • Data Query
    • Data Tools
    • Date Inputs
    • Date Math
    • Dialogs
    • Drawing
    • Dropdownsupdated
    • Editor
    • Excel Export
    • File Saver
    • Form
    • Gauges
    • Grid
    • Icons
    • Indicators
    • Inputs
    • Labels
    • Layoutupdated
      • Overview
      • Getting Started
      • ActionSheetnew
      • AppBar
      • Avatar
      • BottomNavigation
      • Card
      • ContextMenu
      • Drawer
      • ExpansionPanelnew
      • GridLayoutnew
      • Menu
      • PanelBar
      • Splitter
      • StackLayoutnew
      • Stepper
      • TabStrip
      • TileLayoutupdated
      • Wizard
      • Globalization
      • API
    • ListBox
    • ListView
    • Notification
    • PDF Processing
    • Popup
    • Progress Bars
    • Scheduler
    • ScrollView
    • Tooltip
    • TreeList
    • TreeView
    • Upload
  • Wrapper Components
  • Sample Applications
  • Styling & Themes
  • Common Features
  • Project Setup
  • Knowledge Base
  • Changelog
  • FAQ
  • Troubleshooting
New to Kendo UI for Vue? Start a free 30-day trial

DrawerContent

Represents the Kendo UI for Vue Drawer component.

<template>
  <div>
    <Drawer
      :expanded="expanded"
      :position="position"
      :mode="mode"
      :items="
        items.map((item, index) => ({
          ...item,
          selected: index === selectedId,
        }))
      "
      @select="handleSelect"
    >
      <DrawerContent>
        <k-button @click="handleClick"> Toggle the drawer state </k-button>
      </DrawerContent>
    </Drawer>
  </div>
</template>

<script>
import { Drawer, DrawerContent } from "@progress/kendo-vue-layout";
import { Button } from "@progress/kendo-vue-buttons";
import "./styles.css";

export default {
  name: "App",
  components: { Drawer, DrawerContent, "k-button": Button },
  data() {
    return {
      items: [
        {
          text: "Inbox",
          icon: "inbox",
          selected: true,
        },
        {
          text: "Calendar",
          icon: "calendar",
        },
        {
          text: "Attachments",
          icon: "hyperlink-email",
        },
        {
          text: "Favourites",
          icon: "star-outline",
        },
      ],
      expanded: true,
      selectedId: 0,
      position: "start",
      mode: "push",
    };
  },
  methods: {
    handleClick(e) {
      this.expanded = !this.expanded;
    },
    handleSelect(e) {
      this.selectedId = e.itemIndex;
    },
  },
};
</script>

In this article

Not finding the help you need?