Components
Generic header
A generic header to help services not on GOV.UK.
Children are the logo.
Import
import * as GenericHeader from 'govuk-react/generic-header';Examples
Default
Code
<GenericHeader.Root>
<GenericHeader.Container>
<GenericHeader.Logo>
<GenericHeader.HomepageLink href="#">
<svg width="28" height="30" viewBox="0 0 28 30" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<circle cx="13.5549" cy="4.21349" r="4.21349" />
<circle cx="13.5549" cy="25.7865" r="4.21349" />
<circle cx="22.8963" cy="9.6068" r="4.21349" />
<circle cx="4.2135" cy="20.3932" r="4.21349" />
<circle cx="22.8963" cy="20.3932" r="4.21349" />
<circle cx="4.21351" cy="9.60674" r="4.21349" />
</svg>{' '}
Service name
</GenericHeader.HomepageLink>
</GenericHeader.Logo>
</GenericHeader.Container>
</GenericHeader.Root>API reference
GenericHeader.Root
A generic header to help services not on GOV.UK.
No props of its own. Other props are passed to the element it renders.
GenericHeader.Composite
A generic header to help services not on GOV.UK.
Children are the logo.
| Prop | Type |
|---|---|
fullWidth | boolean |
homepageHrefThe URL of the logo link. Defaults to the root of the current web domain ("/"). | string |
containerClassNameClasses for the container. Useful if you want to make the Generic header fixed width. | string |
GenericHeader.Container
| Prop | Type |
|---|---|
fullWidth | boolean |
GenericHeader.HomepageLink
No props of its own. Other props are passed to the element it renders.
GenericHeader.Logo
No props of its own. Other props are passed to the element it renders.