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.
Example
The following example shows a PageLayout with all four areas populated.
Visibility Controls
Use the toggles below to show and hide the Header, Navigation, and Footer areas.
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 |
Header | RenderFragment? | Content rendered in the header area at the top of the layout. Typically contains a | |
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 |
Navigation | RenderFragment? | Content rendered in the navigation area to the left of the body. Scrolls independently from the body. Typically contains a | |
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 |
ValidationSummaryVisible | bool | True | Controls whether the validation summary is displayed. Defaults to |
BodyBodyClassBodyStyleFooterFooterClassFooterStyleFooterVisibleHeaderHeaderClassHeaderStyleHeaderVisibleNavigationNavigationClassNavigationStyleNavigationVisibleValidationSummaryVisible