Skip to main content

Layout

The layout component included three main parts: Header, Content, and Footer. You can design your Layout with the child layout components as in the following examples.

Example

Live Editor
Result
Loading...

Components

The <Layout.Header /> component is responsible for keeping your page header in the layout grid.

info

Please use the PageHeader component for the header part.

Live Editor
Result
Loading...

Content

The <Layout.Content /> component is responsible for keeping your page content in the layout grid. It has two options:

noPadding: In case you don't want to use default padding in your content area, you can provide the prop noPadding to the <Layout.Content /> component as in the following example.

Live Editor
Result
Loading...

onContentScroll: you can use this callback prop to get information about the scroll value inside <Layout.Content /> component.

Live Editor
Result
Loading...

The <Layout.Footer /> component is responsible for keeping your page footer in the layout grid. You also can exclude the footer from your layout by adding the prop noFooter prop to the <Layout /> component.

info

Please use the PageFooter component for the footer part.

Live Editor
Result
Loading...

Variants

You can exclude the <Layout.Footer /> component from your composition by adding the prop noFooter to the <Layout /> component.

Live Editor
Result
Loading...

Spinner

You can use the <Layout.Spinner /> component to show Spinner component while your layout is loading some pages or content. Spinner is a part of the content, please be sure that you are wrapping <Layout.Spinner /> component inside the <Layout.Content /> component as in the following example.

Live Editor
Result
Loading...

Wizard

You can use the layout as a wizard layout by adding the boolean prop wizard to the <Layout /> component. In case of using a wizard layout, please be sure that you are providing the prop kind="wizard" to the <PageHeader /> component as well.

Live Editor
Result
Loading...

Props

NameTypeDefault
noFooter
The appName will be used to inform layout to not use footer area in grid
boolean
wizard
The wizard will be used to inform layout to use wizard template layout
boolean
children
The sub layout components
ReactNode
data-{foo}
Data attributes can be used by testing libraries to retrieve components or assert their existence
string
* - the prop is required.