Skip to main content Home
About About the Design SystemRoadmap
Get started OverviewDesignersDevelopers
Foundations OverviewColorGridIconographyInteractionsSpacingTypography
Tokens Overview Global colorbox shadowTypographyborderopacityspacelengthIconBreakpointsMedia Queries
Elements All elements Accordion Alert Announcement Audio player Avatar Back to top Badge Blockquote Breadcrumb Button Card Chip Code block Call to action Dialog Disclosure Footer Health index Icon Jump links Navigation drawer Navigation (primary) Navigation (secondary) Pagination PopoverPlanned Progress stepsPlanned Site status Skip link Spinner Statistic Subnavigation Surface Switch Table Tabs Tag Tile Timestamp Tooltip Video embed
Theming OverviewColor PalettesCustomizingDevelopers
Patterns All PatternsCardTabsFilterFormLink with iconLogo wallSearch barSticky bannerSticky cardTile
Personalization All Personalization PatternsAnnouncement
Accessibility FundamentalsAccessibility toolsAssistive technologiesCI/CDContentContributorsDesignDevelopmentManual testingResourcesScreen readers
Design/code status Release notes Get support

Navigation drawer

OverviewStyleGuidelinesCodeAccessibilityDemos
Navigation DrawerCollapsible AttributeColor ContextContainer AttributeExpand At AttributeSlotted Header FooterNavigation DrawerCollapsible AttributeColor ContextContainer AttributeExpand At AttributeSlotted Header Footer

Navigation Drawer

import '@rhds/elements/rh-navigation-drawer/rh-navigation-drawer.js';
.container {
  container-type: inline-size;
  height: 100%;
}
<!-- A parent container element with container-type: inline-size is required -->
<div class="container">
  <rh-navigation-drawer>
    Drawer content
  </rh-navigation-drawer>
</div>

Collapsible Attribute

import '@rhds/elements/rh-navigation-drawer/rh-navigation-drawer.js';
.container {
  container-type: inline-size;
  height: 100%;
}

.flex-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--rh-space-2xl, 32px);
  height: 100%;
}

@container (min-width: 992px) {
  .flex-wrap {
    flex-direction: row;
  }
}
<div class="container">
  <rh-navigation-drawer collapsible="">
    Drawer content
  </rh-navigation-drawer>
</div>

Color Context

import '@rhds/elements/lib/elements/rh-context-demo/rh-context-demo.js';
import '@rhds/elements/rh-navigation-drawer/rh-navigation-drawer.js';
.container {
  container-type: inline-size;
  height: 100%;
}

.flex-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--rh-space-2xl, 32px);
  height: 100%;
}

@container (min-width: 992px) {
  .flex-wrap {
    flex-direction: row;
  }
}
<rh-context-demo>
  <div class="container">
    <div class="flex-wrap">
      <rh-navigation-drawer collapsible="">
        <div slot="header">
Header (optional)
        </div>
        Drawer content
        <div slot="footer">
<p>Footer (optional)</p>
        </div>
      </rh-navigation-drawer>

      <h2>Document content</h2>
    </div>
  </div>
</rh-context-demo>

Container Attribute

import '@rhds/elements/rh-navigation-drawer/rh-navigation-drawer.js';
#container {
  container-type: inline-size;
  height: 100%;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--rh-space-2xl, 32px);
  width: 100%;

  @container (min-width: 992px) {
    height: 100%;
    grid-template-columns: 320px 1fr;
  }
}
<div id="container">
  <div class="grid">
    <div class="left-column">
      <rh-navigation-drawer container="#container" collapsible="">
        Drawer content
      </rh-navigation-drawer>
    </div>
    <div class="right-column">
      <h2>Document content</h2>
    </div>
  </div>
</div>

Expand At Attribute

import '@rhds/elements/rh-navigation-drawer/rh-navigation-drawer.js';
.container {
  container-type: inline-size;
  height: 100%;
}

.flex-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--rh-space-2xl, 32px);
  height: 100%;
}

@container (min-width: 768px) {
  .flex-wrap {
    flex-direction: row;
  }
}
<div class="container">
  <div class="flex-wrap">
    <rh-navigation-drawer expand-at="sm" collapsible="">
      Drawer content
    </rh-navigation-drawer>
    <h2>Document content</h2>
  </div>
</div>
import '@rhds/elements/rh-navigation-drawer/rh-navigation-drawer.js';
.container {
  container-type: inline-size;
  height: 100%;
}

.flex-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--rh-space-2xl, 32px);
  height: 100%;
}

@container (min-width: 992px) {
  .flex-wrap {
    flex-direction: row;
  }
}
<div class="container">
  <div class="flex-wrap">
    <rh-navigation-drawer collapsible="">
      <div slot="header">
        Header (optional)
      </div>
      Drawer content
      <div slot="footer">
        <p>Footer (optional)</p>
      </div>
    </rh-navigation-drawer>

    <h2>Document content</h2>
  </div>
</div>

Other libraries

To learn more about our other libraries, visit the getting started page.

© 2021-2025 Red Hat, Inc. Deploys by Netlify