PageLayout
The PageLayout component provides a structured CSS Grid layout with four areas: Header, Navigation, Body, and Footer. It is used to create consistent page structures across your portal.
Layout Areas
The layout uses a CSS Grid with the following areas:
Header— Spans the full width at the top. Typically contains aMenuBarwith save/refresh buttons or page titles.Navigation— Left column below the header. Used for side navigation menus. Scrolls independently from the body.Body— Main content area. Scrolls independently and receives padding automatically.Footer— Spans the full width at the bottom. Typically contains copyright or status information.
<PageLayout>
<Header>
<MenuBar>
<SaveContextButton />
<RefreshContextButton />
</MenuBar>
</Header>
<Navigation>
<!-- Side navigation content -->
</Navigation>
<Body>
<!-- Main page content -->
</Body>
<Footer>
<FluentLabel>© My Company 2026</FluentLabel>
</Footer>
</PageLayout>
Toggling Areas
Each area can be shown or hidden using the HeaderVisible, NavigationVisible, and FooterVisible parameters. When hidden, the area is removed from the grid layout entirely.
<PageLayout HeaderVisible="true"
NavigationVisible="false"
FooterVisible="true">
<Header>Page Title</Header>
<Body>Content without side navigation</Body>
<Footer>Footer</Footer>
</PageLayout>
Styling
Each area supports both a Class and Style parameter (e.g. HeaderClass, HeaderStyle, BodyClass, BodyStyle, etc.) for custom styling. The top-level container also supports Class and Style.
<PageLayout HeaderClass="my-header"
HeaderStyle="background-color: var(--neutral-layer-4);"
BodyClass="my-body"
BodyStyle="padding: 2rem;"
Class="my-page"
Style="min-height: 100vh;">
<Header>Styled Header</Header>
<Body>Styled Body</Body>
</PageLayout>
Nested Layouts
A PageLayout can be nested inside the Body of another PageLayout to create sub-page layouts. The child layout automatically detects the parent and applies a child-layout CSS class with reduced header border styling.
<PageLayout>
<Header>Main Header</Header>
<Body>
<PageLayout>
<Header>
<MenuBar>
<SaveContextButton />
</MenuBar>
</Header>
<Body>
<!-- Sub-page content -->
</Body>
</PageLayout>
</Body>
</PageLayout>
Scroll Behavior
The body area scrolls independently from the header and footer, keeping them fixed in place. When navigating between pages, the body automatically scrolls to the top. The navigation area also scrolls independently.
Page Layout
Here is an example that demonstrates the use of a PageLayout component.
Page Layout (Extended Properties)
This demonstrates the most common properties that are availabe to set on the PageLayout.
PageLayout Class
Parameters
Name | Type | Default | Description |
|---|---|---|---|
Body | RenderFragment? | Content rendered in the main body area. This is the primary content region and scrolls independently from the header, footer, and navigation. Padding is applied automatically. | |
BodyClass | string? | CSS class applied to the body element. | |
BodyStyle | string? | Inline CSS style applied to the body element. | |
Footer | RenderFragment? | Content rendered in the footer area at the bottom of the layout. The footer spans the full width and remains fixed while the body scrolls. Typically contains copyright notices or status information. | |
FooterClass | string? | CSS class applied to the footer element. | |
FooterStyle | string? | Inline CSS style applied to the footer element. | |
FooterVisible | bool | True | Controls whether the footer area is rendered. When set to false, the footer is removed from the grid layout entirely. Defaults to true. |
Header | RenderFragment? | Content rendered in the header area at the top of the layout. Typically contains a MenuBar with save/refresh buttons, breadcrumbs, or page titles. The header spans the full width and remains fixed while the body scrolls. | |
HeaderClass | string? | CSS class applied to the header element. Use this to apply custom styling such as background colors or borders. | |
HeaderStyle | string? | Inline CSS style applied to the header element. | |
HeaderVisible | bool | True | Controls whether the header area is rendered. When set to false, the header is removed from the grid layout entirely and the body expands to fill the space. Defaults to true. |
Navigation | RenderFragment? | Content rendered in the navigation area to the left of the body. Scrolls independently from the body. Typically contains a FluentNavMenu for side navigation. The navigation area sizes to its content width up to a maximum of 35% of the viewport width. | |
NavigationClass | string? | CSS class applied to the navigation element. | |
NavigationStyle | string? | Inline CSS style applied to the navigation element. | |
NavigationVisible | bool | True | Controls whether the navigation area is rendered. When set to false, the navigation is removed from the grid layout and the body expands to the full width. Defaults to true. |
ValidationSummaryVisible | bool | True | Controls whether the validation summary is displayed. Defaults to true. |
Bodyfrom the header, footer, and navigation. Padding is applied automatically.
BodyClassBodyStyleFooterand remains fixed while the body scrolls. Typically contains copyright notices or status information.
FooterClassFooterStyleFooterVisiblefrom the grid layout entirely. Defaults to true.
Headersave/refresh buttons, breadcrumbs, or page titles. The header spans the full width and remains
fixed while the body scrolls.
HeaderClassHeaderStyleHeaderVisiblefrom the grid layout entirely and the body expands to fill the space. Defaults to true.
NavigationTypically contains a FluentNavMenu for side navigation. The navigation area sizes to its content
width up to a maximum of 35% of the viewport width.
NavigationClassNavigationStyleNavigationVisiblefrom the grid layout and the body expands to the full width. Defaults to true.
ValidationSummaryVisible