DefaultLayout
DefaultLayout is the single-area page shell: a grid with one content area that fills its parent's width and height.
Pass the page as a component reference, not as JSX. For a persistent side navigation, use SideBarLayout.Page Layouts
When to use
Use when
- The page has no persistent side navigation: sign-in, splash, error and full-screen flows.
- Navigation already lives at another level, such as your own header or a modal flow.
Avoid when
Usage
layoutComponents.content takes a component (React.ElementType); DefaultLayout renders it. The content is
centered horizontally below the md viewport breakpoint and aligned to the start from md up.
Page content
import { DefaultLayout } from '@apollion-dsi/core/layouts/default-layout';
const Page = () => <main>Page content</main>;
<DefaultLayout layoutComponents={{ content: Page }} />;DefaultLayout mounts no header. Render your own header inside the content component when the page needs one.
Accessibility
- The layout renders plain
<div>elements with no landmark roles. Render<main>(and<header>when present) inside yourcontentcomponent. - The mobile and desktop alignment differ only in CSS, so server and client render the same tree.
Properties
Name
Type
Default
Description
layoutComponents{ content: ElementType<any, keyof IntrinsicElements>; }none