NavigationDrawer
NavigationDrawer provides vertical navigation destinations with selectable items and expandable sections. Use iconSpace="root" when top-level icon and text-only items should share the same label column. Use iconOnly for compact drawers that show leading icons, keep labels available to assistive technologies, and expose labels as tooltips. Use shape to set the default shape for items and section triggers; an individual NavigationDrawerItem can override it.
Anatomy
| Element | Part | Selector |
|---|---|---|
<nav> | root | [data-scope="navigation-drawer"][data-part="root"]LMBCopy |
<div> | headerconditional | [data-scope="navigation-drawer"][data-part="header"]LMBCopy |
<div> | items | [data-scope="navigation-drawer"][data-part="items"]LMBCopy |
<div> | footerconditional | [data-scope="navigation-drawer"][data-part="footer"] |
Anatomy
| Element | Part | Selector |
|---|---|---|
<component> | root | [data-scope="navigation-drawer-item"][data-part="root"]LMBCopy |
<span> | leadingconditional | [data-scope="navigation-drawer-item"][data-part="leading"]LMBCopy |
<span> | labelconditional | [data-scope="navigation-drawer-item"][data-part="label"]LMBCopy |
<span> | trailingconditional | [data-scope="navigation-drawer-item"][data-part="trailing"]LMBCopy |
Anatomy
| Element | Part | Selector |
|---|---|---|
<section> | root | [data-scope="navigation-drawer-section"][data-part="root"]LMBCopy |
<button> | trigger | [data-scope="navigation-drawer-section"][data-part="trigger"]LMBCopy |
<span> | leadingconditional | [data-scope="navigation-drawer-section"][data-part="leading"]LMBCopy |
<span> | labelconditional | [data-scope="navigation-drawer-section"][data-part="label"]LMBCopy |
<Icon> | chevron | [data-scope="navigation-drawer-section"][data-part="chevron"]LMBCopy |
<div> | content | [data-scope="navigation-drawer-section"][data-part="content"]LMBCopy |
<div> | content-inner | [data-scope="navigation-drawer-section"][data-part="content-inner"]LMBCopy |
Props
| Name | Description | Default | Control |
|---|---|---|---|
ariaLabelOptional | Accessible label for the navigation landmark. string | undefined | "Navigation drawer" | |
disabledOptional | Disable all items inside the drawer. boolean | undefined | false | |
iconSpaceOptional | Controls where leading icon space is reserved for items and sections that do not render an icon. nonerootall | "none" | |
iconOnlyOptional | Show only leading icons while keeping labels available to assistive technologies. boolean | undefined | false | |
shapeOptional | Default shape for items and section triggers inside the drawer. roundedsquare | undefined | |
modelValueOptional | - string | undefined | - |
Events1
| Name | Type | Description |
|---|---|---|
update:modelValue | [value: string | undefined] | - |
Slots3
| Name | Parameters | Description |
|---|---|---|
header | - | Optional header content above navigation items. |
default | - | Navigation destinations. Usually NavigationDrawerItem and NavigationDrawerSection components. |
footer | - | Optional footer content below navigation items. |
Styling24
| Token | Description |
|---|---|
--md-navigation-drawer-container-colorColorFallback var(--md-sys-color-surface-container-low) | Controls container color. |
--md-navigation-drawer-container-shapeShapeFallback var(--md-shape-docked) | Controls container shape. |
--md-navigation-drawer-container-widthLayoutFallback --dp(360) | Controls container width. |
--md-navigation-drawer-content-gapLayoutFallback --dp(4) | Controls item gap. |
--md-navigation-drawer-padding-blockLayoutFallback --dp(12) | Controls block padding. |
--md-navigation-drawer-padding-inlineLayoutFallback --dp(12) | Controls inline padding. |
--md-navigation-drawer-item-active-icon-colorColorFallback var(--md-sys-color-on-secondary-container) | Controls item active icon color. |
--md-navigation-drawer-item-active-indicator-colorColorFallback var(--md-sys-color-secondary-container) | Controls item active indicator color. |
--md-navigation-drawer-item-active-label-colorColorFallback var(--md-sys-color-on-secondary-container) | Controls item active label color. |
--md-navigation-drawer-item-active-state-layer-colorStateFallback var(--md-sys-color-on-secondary-container) | Controls item active state layer color. |
--md-navigation-drawer-item-disabled-opacityDisabledFallback 0.38 | Controls item disabled opacity. |
--md-navigation-drawer-item-focus-indicator-colorFocusFallback var(--md-sys-color-secondary) | Controls item focus indicator color. |
--md-navigation-drawer-item-focus-indicator-offsetFocusFallback var(--md-sys-state-focus-indicator-outer-offset) | Controls item focus indicator offset. |
--md-navigation-drawer-item-focus-indicator-thicknessFocusFallback var(--md-sys-state-focus-indicator-thickness) | Controls item focus indicator thickness. |
--md-navigation-drawer-item-gapLayoutFallback --dp(12) | Controls item content gap. |
--md-navigation-drawer-item-heightLayoutFallback --dp(56) | Controls item minimum height. |
--md-navigation-drawer-item-icon-sizeLayoutFallback --dp(24) | Controls item icon size. |
--md-navigation-drawer-item-inactive-icon-colorColorFallback var(--md-color-on-container) | Controls item inactive icon color. |
--md-navigation-drawer-item-inactive-label-colorColorFallback var(--md-color-on-container) | Controls item inactive label color. |
--md-navigation-drawer-item-inactive-state-layer-colorStateFallback var(--md-state-layer-color, var(--md-color-on-container)) | Controls item inactive state layer color. |
--md-navigation-drawer-item-indicator-shapeShapeFallback var(--md-shape-indicator) | Controls item indicator shape. |
--md-navigation-drawer-item-motionMotionFallback var(--md-easing-spatial) | Controls item and section motion. |
--md-navigation-drawer-item-padding-inlineLayoutFallback --dp(16) | Controls item inline padding. |
--md-navigation-drawer-section-content-indentLayoutFallback 0; --dp(36) with iconSpace root/all | Controls nested section content indent when iconSpace is root or all. |
Examples
Default
Without Icons
Icon Only
API
NavigationDrawer
Props
| Name | Description | Default |
|---|---|---|
ariaLabelOptional | Accessible label for the navigation landmark. string | undefined | "Navigation drawer" |
disabledOptional | Disable all items inside the drawer. boolean | undefined | false |
iconSpaceOptional | Controls where leading icon space is reserved for items and sections that do not render an icon. nonerootall | "none" |
iconOnlyOptional | Show only leading icons while keeping labels available to assistive technologies. boolean | undefined | false |
shapeOptional | Default shape for items and section triggers inside the drawer. roundedsquare | undefined |
modelValueOptional | - string | undefined | - |
Events1
| Name | Type | Description |
|---|---|---|
update:modelValue | [value: string | undefined] | - |
Slots3
| Name | Parameters | Description |
|---|---|---|
header | - | Optional header content above navigation items. |
default | - | Navigation destinations. Usually NavigationDrawerItem and NavigationDrawerSection components. |
footer | - | Optional footer content below navigation items. |
NavigationDrawerItem
Props
| Name | Description | Default |
|---|---|---|
valueOptional | Destination value used by NavigationDrawer v-model. string | undefined | undefined |
iconOptional | Default icon name (Material Symbols Outlined). string | undefined | undefined |
labelOptional | Fallback label text when default slot is not provided. string | undefined | undefined |
hrefOptional | Optional href. When provided, the item renders as an anchor. string | undefined | undefined |
shapeOptional | The shape of the item. roundedsquare | undefined |
disabledOptional | Disable interaction. boolean | undefined | false |
selectedOptional | Force selected state when not controlled by NavigationDrawer. boolean | undefined | undefined |
ariaLabelOptional | Accessible label. Useful when label text is omitted visually. string | undefined | undefined |
Events0
No events documented.
Slots3
| Name | Parameters | Description |
|---|---|---|
default | - | Label content. |
icon | - | Icon content. |
trailing | - | Optional trailing content. |
NavigationDrawerSection
Props
| Name | Description | Default |
|---|---|---|
iconOptional | Default icon name (Material Symbols Outlined). string | undefined | undefined |
labelOptional | Fallback label text when label slot is not provided. string | undefined | undefined |
disabledOptional | Disable the section trigger and all nested content. boolean | undefined | false |
ariaLabelOptional | Accessible label for the expand trigger. string | undefined | undefined |
expandedOptional | - boolean | undefined | false |
Events1
| Name | Type | Description |
|---|---|---|
update:expanded | [value: boolean] | - |
Slots3
| Name | Parameters | Description |
|---|---|---|
default | - | Nested navigation destinations. |
label | - | Section label content. |
icon | - | Icon content. |