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 a MenuBar with 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.
React
Blazor

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.

React
Blazor

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.

React
Blazor

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.

React
Blazor

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.

React example
Blazor example
React TypeScript
Razor

Configuration Options

Use the controls below to toggle each area's visibility and tune the resizable-navigation behavior — turn the splitter on/off, opt out of the localStorage persistence, and adjust the default / minimum / maximum drag widths. Drag the handle on the navigation/body boundary to resize, or double-click it to reset to the default width.

React example
Blazor example
Show Header? Show Navigation? Show Footer? Enable Navigation Resizing? Persist Navigation Width?
React TypeScript
Razor
React Blazor

PageLayout Class

Parameters

Name
Type
Default
Description
BodyRenderFragment?
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.
BodyClassstring?
CSS class applied to the body element.
BodyStylestring?
Inline CSS style applied to the body element.
DefaultNavigationWidthint
280
Navigation width in px used before the user resizes, and on double-click reset. Defaults to 280.
EnableNavigationResizingbool
True
When true, a drag handle on the navigation/body boundary lets the user resize the navigation column. Defaults to true. Has no effect when Layout.PageLayout.NavigationVisible is false or the navigation slot is empty, and the handle disables on mobile (where the navigation reverts to a viewport- relative width). Double-click the handle to reset to Layout.PageLayout.DefaultNavigationWidth.
FooterRenderFragment?
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.
FooterClassstring?
CSS class applied to the footer element.
FooterStylestring?
Inline CSS style applied to the footer element.
FooterVisiblebool
True
Controls whether the footer area is rendered. When set to false, the footer is removed from the grid layout entirely. Defaults to true.
HeaderRenderFragment?
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.
HeaderClassstring?
CSS class applied to the header element. Use this to apply custom styling such as background colors or borders.
HeaderStylestring?
Inline CSS style applied to the header element.
HeaderVisiblebool
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.
MaxNavigationWidthint
480
Largest the navigation column will ever grow to, in px. Defaults to 480. Unified cap: when Layout.PageLayout.EnableNavigationResizing is on, this is the upper bound the user can drag the splitter to; when it's off, this is the element's max-width. Mobile (≤767.97px viewport) still falls back to a viewport-relative cap so a 480px default doesn't overrun a 360px phone.
MinNavigationWidthint
200
Smallest the navigation can be dragged to, in px. Defaults to 200.
NavigationRenderFragment?
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.
NavigationClassstring?
CSS class applied to the navigation element.
NavigationResizeHandleLabelstring
Resize navigation
Accessible label for the resize handle (rendered with role='separator'). Defaults to 'Resize navigation'.
NavigationResizeStorageKeystring
ppp-page-layout-nav-width
localStorage key the chosen navigation width persists under. Defaults to 'ppp-page-layout-nav-width'. Set a distinct key per layout if more than one resizable Layout.PageLayout can be shown. Ignored when Layout.PageLayout.PersistNavigationWidth is false.
NavigationStylestring?
Inline CSS style applied to the navigation element.
NavigationVisiblebool
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.
PersistNavigationWidthbool
True
When true (the default), the navigation width the user drags to is persisted to localStorage under Layout.PageLayout.NavigationResizeStorageKey and restored on subsequent loads. Set to false to make every page load start fresh at Layout.PageLayout.DefaultNavigationWidth. Only meaningful when Layout.PageLayout.EnableNavigationResizing is true.
ValidationSummaryVisiblebool
True
Controls whether the validation summary is displayed. Defaults to true.
Name: Body
Type: RenderFragment?
Description: 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.
Name: BodyClass
Type: string?
Description: CSS class applied to the body element.
Name: BodyStyle
Type: string?
Description: Inline CSS style applied to the body element.
Name: DefaultNavigationWidth
Type: int
Default: 280
Description: Navigation width in px used before the user resizes, and on double-click reset. Defaults to 280.
Name: EnableNavigationResizing
Type: bool
Default: True
Description: When true, a drag handle on the navigation/body boundary lets the user resize the navigation column. Defaults to true. Has no effect when Layout.PageLayout.NavigationVisible is false or the navigation slot is empty, and the handle disables on mobile (where the navigation reverts to a viewport- relative width). Double-click the handle to reset to Layout.PageLayout.DefaultNavigationWidth.
Name: Footer
Type: RenderFragment?
Description: 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.
Name: FooterClass
Type: string?
Description: CSS class applied to the footer element.
Name: FooterStyle
Type: string?
Description: Inline CSS style applied to the footer element.
Name: FooterVisible
Type: bool
Default: True
Description: Controls whether the footer area is rendered. When set to false, the footer is removed from the grid layout entirely. Defaults to true.
Name: Header
Type: RenderFragment?
Description: 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.
Name: HeaderClass
Type: string?
Description: CSS class applied to the header element. Use this to apply custom styling such as background colors or borders.
Name: HeaderStyle
Type: string?
Description: Inline CSS style applied to the header element.
Name: HeaderVisible
Type: bool
Default: True
Description: 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.
Name: MaxNavigationWidth
Type: int
Default: 480
Description: Largest the navigation column will ever grow to, in px. Defaults to 480. Unified cap: when Layout.PageLayout.EnableNavigationResizing is on, this is the upper bound the user can drag the splitter to; when it's off, this is the element's max-width. Mobile (≤767.97px viewport) still falls back to a viewport-relative cap so a 480px default doesn't overrun a 360px phone.
Name: MinNavigationWidth
Type: int
Default: 200
Description: Smallest the navigation can be dragged to, in px. Defaults to 200.
Name: Navigation
Type: RenderFragment?
Description: 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.
Name: NavigationClass
Type: string?
Description: CSS class applied to the navigation element.
Name: NavigationResizeHandleLabel
Type: string
Default: Resize navigation
Description: Accessible label for the resize handle (rendered with role='separator'). Defaults to 'Resize navigation'.
Name: NavigationResizeStorageKey
Type: string
Default: ppp-page-layout-nav-width
Description: localStorage key the chosen navigation width persists under. Defaults to 'ppp-page-layout-nav-width'. Set a distinct key per layout if more than one resizable Layout.PageLayout can be shown. Ignored when Layout.PageLayout.PersistNavigationWidth is false.
Name: NavigationStyle
Type: string?
Description: Inline CSS style applied to the navigation element.
Name: NavigationVisible
Type: bool
Default: True
Description: 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.
Name: PersistNavigationWidth
Type: bool
Default: True
Description: When true (the default), the navigation width the user drags to is persisted to localStorage under Layout.PageLayout.NavigationResizeStorageKey and restored on subsequent loads. Set to false to make every page load start fresh at Layout.PageLayout.DefaultNavigationWidth. Only meaningful when Layout.PageLayout.EnableNavigationResizing is true.
Name: ValidationSummaryVisible
Type: bool
Default: True
Description: Controls whether the validation summary is displayed. Defaults to true.