Page
Lays out the body of a GOV.UK page: skip link, header and footer landmarks, width container and main wrapper.
For custom layouts, compose SkipLink, WidthContainer and MainWrapper directly.
- https://design-system.service.gov.uk/styles/page-template/
- https://design-system.service.gov.uk/styles/layout/#page-wrappers
Read the Design System guidance for page
Import
import { Page } from 'govuk-react/page';Examples
Default
Code
<Page beforeChildren={<BackLink href="#" />}>
<Heading size="xl">Page title</Heading>
</Page>With footer
Code
<Page footer={<Footer.Composite />}>
<Heading size="xl">Page title</Heading>
</Page>API reference
Page
Lays out the body of a GOV.UK page: skip link, header and footer landmarks, width container and main wrapper.
For custom layouts, compose SkipLink, WidthContainer and MainWrapper directly.
- https://design-system.service.gov.uk/styles/page-template/
- https://design-system.service.gov.uk/styles/layout/#page-wrappers
| Prop | Type |
|---|---|
childrenPage contents, rendered inside the main wrapper. | React.ReactNode |
idId of the main wrapper, which the skip link points to. | string |
headerPage header, such as | React.ReactNode |
footerPage footer, such as | React.ReactNode |
beforeChildrenContent outside the main wrapper but inside the width container, such as a back link, breadcrumbs or phase banner. | React.ReactNode |
skipLinkTextText for the skip link. | React.ReactNode |