​

Latest release:
v2.6.15

# Navigation drawers

The v-navigation-drawer component is what your users will utilize to navigate through the application. The navigation-drawer is pre-configured to work with or without vue-router right out the box. For the purpose of display, some examples are wrapped in a v-card element. Within your application you will generally place the v-navigation-drawer as a direct child of v-app.

# Usage

The navigation drawer is primarily used to house links to the pages in your application. Using null as the starting value for its v-model will initialize the drawer as closed on mobile and as open on desktop. It is common to pair drawers with the v-list component using the nav property.


# API

  • v-navigation-drawer

# Caveats

If you are using v-navigation-drawer with app property enabled, you don’t need to use absolute prop as in examples.

The expand-on-hover prop does not alter the content area of v-main. To have content area respond to expand-on-hover, bind mini-variant.sync to a data prop.

# Examples

# Props

# Bottom drawer

Using the bottom prop, we are able to relocate our drawer on mobile devices to come from the bottom of the screen. This is an alternative style and only activates once the mobile-breakpoint is met.


# Expand on hover

Places the component in mini-variant mode and expands once hovered. This does not alter the content area of v-main. The width can be controlled with the mini-variant-width property.


# Images

Apply a custom background to your drawer via the src prop. If you need to customize v-img's properties you can use the img slot.


# Mini variant

When using the mini-variant prop, the drawer will shrink (default 56px) and hide everything inside of v-list except the first element. In this example we use the .sync modifier that allows us to tie the expanding/contracting of the drawer programmatically.


# Permanent and floating

By default, a navigation drawer has a 1px right border that separates it from content. In this example we want to detach the drawer from the left side and let it float on its own. The floating property removes the right border (or left if using right).


# Right

Navigation drawers can also be positioned on the right side of your application (or an element). This is also useful for creating a side-sheet with auxiliary information that may not have any navigation links. When using RTL you must explicitly define right for your drawer.


# Temporary

A temporary drawer sits above its application and uses a scrim (overlay) to darken the background. This drawer behavior is mimicked by default when on mobile. Clicking outside of the drawer will cause it to close.


# Misc

# Colored drawer

Navigation drawers can be customized to fit any application’s design. Here we apply a custom background color and an appended content area using the append slot.


# Combined drawer

In this example we define a custom width to accommodate our nested drawer. Using v-row we ensure that the drawer and list stack horizontally next to each other.


Ready for more?

Continue your learning with related content selected by the Team or move between pages by using the navigation links below.

Edit this page on GitHub
Last updated:08/13/2020, 9:48:57 PM
Contents
  • Usage
  • API
  • Caveats
  • Examples
  • Props
  • Bottom drawer
  • Expand on hover
  • Images
  • Mini variant
  • Permanent and floating
  • Right
  • Temporary
  • Misc
  • Colored drawer
  • Combined drawer
Close

New content is available. Click Refresh to update.

Settings
Theme
Light
Dark
System
Mixed

Drawer navigation grouping
Standard
Alpha

Direction
LTR
RTL

API
Link Only
Inline