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
Components
Header
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.
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.
onContentScroll: you can use this callback prop to get information about the scroll value inside <Layout.Content />
component.
Footer
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.
Variants
No Footer
You can exclude the <Layout.Footer />
component from your composition by adding the prop noFooter
to the <Layout />
component.
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.
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.
Props
Name | Type | Default |
---|---|---|
noFooter The appName will be used to inform layout to not use footer area in grid |
| — |
wizard The wizard will be used to inform layout to use wizard template layout |
| — |
children The sub layout components |
| — |
data-{foo} Data attributes can be used by testing libraries to retrieve components or assert their existence |
| — |
* - the prop is required. |