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

App Layout

The app layout provides a complete application shell with an app bar, responsive navigation drawer, and a body area for page content.

Usage

forge-app-layout scaffolds an entire application: an app bar with logo, title, and actions; a navigation drawer that sits beside the body on large screens and becomes a modal drawer on small ones; and a body area with optional header, footer, and side panels. Start every Forge app with it, put page content in the body slot, and let the layout handle responsiveness.

The app layout isn’t included in the root @tylertech/forge import, so register it with its own side-effect import:

import '@tylertech/forge/app-layout';

To fill the window, <body> needs height: 100dvh; width: 100dvw; margin: 0; background-color: var(--forge-theme-surface-dim). Load forge-core.css from @tylertech/forge/dist/forge-core.css to get these, or set them yourself.

Slots

  • app-bar-logo, app-bar-start, app-bar-center, app-bar-end: content placed in the built-in app bar.
  • navigation: the navigation drawer contents, typically a forge-list with navlist.
  • body: the main page content. Use a <main slot="body"> element.
  • body-header, body-footer, body-left, body-right: regions scoped to the body area.
  • header, footer, left, right: regions that frame the entire layout.

On small screens the navigation becomes a modal drawer. Add data-forge-app-layout-close to any clickable item in the navigation slot to close the modal drawer when it’s activated.

Set use-mini-drawer to collapse the drawer to an icon-only mini drawer, and add mini-hover to expand it while hovered.

Rules

Do
Use the app layout as the outermost structure for a full application page.Put navigation in the navigation slot so it adapts to screen size.Use a forge-list with the navlist attribute in the navigation slot.Put page content in a <main slot="body"> element.Treat the app title as the page's h1 and start content headings at h2.
Don't
Don't nest an app layout inside another app layout or a scaffold.Don't build a separate app bar and drawer by hand when the layout already provides them.Don't place primary page content in the side slots — those are for supplementary panels.

Basic layout

An app bar with a logo, title, and actions, a navigation list, and a body with a header toolbar and footer.

A standard application shell.

A responsive application layout component that provides an app bar with a navigation drawer. On small screens, the navigation appears in a modal dialog. On large screens, it appears in a side drawer.

import "@tylertech/forge/app-layout";
Properties
PropertyAttributeTypeDefaultDescription
appTitle—string''The title text to display in the app bar.
appTitleHref—string''The URL that the app bar title links to.
breakpoint—number960The screen width breakpoint in pixels for responsive behavior.
useMiniDrawer—booleanfalseWhether to use `forge-mini-drawer` instead of `forge-drawer` for large screens.
miniHover—booleanfalseWhether the mini drawer should expand on hover.
isLargeScreen—boolean—Whether the current screen width is above the breakpoint.
Events
NameTypeDescription
forge-app-layout-breakpoint-changeCustomEvent<AppLayoutBreakpointChangeEventData>Fired when the screen size crosses the breakpoint threshold.
forge-app-layout-drawer-changeCustomEvent<AppLayoutDrawerChangeEventData>Fired when the navigation drawer opens or closes.
Slots
NameDescription
(default)Default slot. Content without a slot attribute is placed in the body area.
bodyExplicit body slot. Alternative to using the default slot.
headerPlaces content in the header
footerPlaces content in the footer
leftPlaces content to the left of all content
rightPlaces content to the right of all content
body-headerPlaces content in the header of the body
body-footerPlaces content in the footer of the body
body-leftPlaces content to the left of the body content
body-rightPlaces content to the right of the body content
navigationResponsive navigation content that renders in left slot (small screens) or body-left slot (large screens)
app-bar-logoPlaces content in the app bar logo slot
app-bar-startPlaces content in the app bar start slot
app-bar-centerPlaces content in the app bar center slot
app-bar-endPlaces content in the app bar end slot
CSS Custom Properties
NameDescription
--forge-app-layout-drawer-widthControls the width of the navigation drawer (default: 320px).
--forge-app-layout-dialog-widthControls the width of the navigation dialog on small screens (default: 320px).
--forge-app-layout-mini-drawer-z-indexControls the z-index of the mini drawer when using hover mode (default: 3).
Methods
NameReturnsDescription
closeDrawer()voidCloses the navigation drawer. Only has effect on small screens where the drawer is modal.

Accessibility documentation coming soon.

Loading Forge chat…