HomeGetting StartedColor SystemTypographySpacingIconographyLayoutInstallationUsageAngularBlazorReactSvelteVueThemingTypographyCustomizationCSS-Only ComponentsFormsIconsIllustrationsAccessibilityGlobal ConfigurationTailwind CSSSass LibraryForge MCP ServerDropdown OptionsFocus Indicator ClippingAll componentsButtonButton AreaChipFloating Action ButtonIcon ButtonSplit ButtonAutocompleteButton ToggleCalendarCheckboxChip FieldColor PickerDate PickerDate Range PickerFile PickerLabelRadioSelectSliderSwitchText FieldTime PickerApp BarApp LauncherDrawerMenuPaginatorSkip LinkStepperTabsView SwitcherAccordionApp LayoutCardDividerExpansion PanelScaffoldSplit ViewStackStructured CardToolbarBadgeBannerBusy IndicatorCircular ProgressDialogInline MessageLinear ProgressPage StateSkeletonToastTooltipAvatarIconKeyLabel ValueListMeterSecretTableTimelineTimestampTreeKeyboard ShortcutPopoverIntroductionColorTypographySpacingShapeBorderElevationLayeringAnimationUsageIcon LibraryBlocksRoadmapChangelogBlog

Drawer

Drawers support persistent navigation or supplementary content pinned to the left or right edge of the screen.

Overview

Drawers are panels that provide supplementary content alongside the main application interface. They can appear on the left or right side of the screen and serve various purposes including navigation, filtering, and displaying detailed information. Drawers help organize content hierarchically while maintaining focus on the primary interface.

The drawer component supports multiple interaction patterns—from persistent navigation panels on desktop to modal overlays on mobile—making them versatile for both primary navigation and contextual content display. They maintain consistent positioning and elevation relationships with the main content while providing smooth transitions and appropriate accessibility features.

Usage

The drawer component provides no semantics by default. Supply your own <aside> for navigation, or the appropriate ARIA roles for other content.

forge-drawer pins persistent navigation or supplementary content to an edge through open and direction, and slots into a forge-scaffold’s side slots. Use a plain drawer when it should stay visible and dismissible by choice, forge-mini-drawer when it should collapse to a narrow icon rail, and forge-modal-drawer when it should overlay the page with a backdrop instead of sharing space with it. For apps with fewer than five primary destinations, use tabs instead of a navigation drawer.

Rules

Do
Keep the drawer's menu button visible in the app bar at every screen size so it can always be reopened.Use a plain, dismissible drawer on desktop and a modal drawer at tablet and mobile widths for the same navigation.Use a mini drawer on desktop when the main content needs the extra width a full drawer would take.
Don't
Don't duplicate primary navigation in both a drawer and the app bar — pick one place for it.Don't build a modal side panel from forge-modal-drawer for a one-off sidesheet — prefer forge-dialog with a left-sheet or right-sheet preset instead.Don't use a navigation drawer for fewer than five primary destinations — tabs are simpler.

Basic usage

A plain drawer sits in a scaffold’s side slot alongside the main content, toggled open and closed by a menu button in the app bar.

A dismissible drawer with navigation links, inside a scaffold.

Mini drawer

forge-mini-drawer collapses to a narrow icon rail and optionally expands to full width on pointer hover — use it on desktop when the main content needs the extra width a full drawer would take. Hover-to-expand is a pointer-only affordance and isn’t available on touch devices.

A mini drawer collapsed to an icon rail, with tooltips labeling each item.

Deprecated

forge-modal-drawer is being phased out in favor of forge-dialog with a sheet preset (left-sheet or right-sheet) — prefer that for new work.

forge-modal-drawer slides in over the page with a backdrop instead of sharing space with the content — typically used at tablet and mobile widths in place of a dismissible drawer.

A modal drawer overlaying the page with a backdrop.

A persistent side navigation drawer component that provides the ability to dismiss and open the drawer with smooth animations. Use for navigation or to display additional content alongside the main application content.

import "@tylertech/forge/drawer";
Properties
PropertyAttributeTypeDefaultDescription
openopenbooleanfalseToggles whether the drawer is visible or not.
directiondirectionDrawerDirection"left"Controls the layout and animation direction of the drawer for positioning on the left vs. right side of the screen when toggling the `open` attribute.
Events
NameTypeDescription
forge-drawer-after-openCustomEvent<void>Dispatched after the drawer has opened.
forge-drawer-after-closeCustomEvent<void>Dispatched after the drawer has closed.
Slots
NameDescription
(default)The content to display in the scrollable content container.
headerThe header content above the main content.
footerThe footer content below the main content.
CSS Parts
NameDescription
::part(root)The component's root element.
::part(content)The content container element.
CSS Custom Properties
NameDescription
--forge-drawer-widthThe width of the drawer.
--forge-drawer-backgroundThe background color of the drawer.
--forge-drawer-border-colorThe border of the drawer.
--forge-drawer-border-widthThe border width of the drawer.
--forge-drawer-transition-durationThe transition duration of the drawer.
--forge-drawer-transition-easingThe transition timing function of the drawer.
--forge-drawer-duration-closeThe duration of the drawer closing animation.

Screen reader behavior

forge-drawer does not provide any semantics by default, in any of its variants (permanent, dismissible, or mini). Provide your own <aside> element when the drawer holds navigation, or the appropriate ARIA role for whatever else it contains — the component won’t infer this for you.

Loading Forge chat…