Skip to content

Header

Use the Header component to create a header that has all of its items aligned vertically with consistent horizontal spacing.

Default example

All items directly under the Header component should be a Header.Item component. Inside these components can be anything (text, forms, images...), and the Header.Item component will make sure these elements vertically align with each other.

Header.Item elements have a built-in margin that will need to be overridden with the mr={0} props for the last element in the container. We relied on the prop here instead of :last-child because the last child isn't always the item visible. On responsive pages, there's a mobile menu that gets presented to the user at smaller breakpoints.

Menu
@octocat

Header with full-size item example

Item 1
Item 2
Item 3

System props

Header and Header.Item components get COMMON and BORDER system props. Header.Link component gets COMMON, BORDER, and TYPOGRAPHY system props. Read our System Props doc page for a full list of available props.

Component props

Header.Item

Prop nameTypeDescription
fullBooleanstretches item to fill the available space
Prop nameTypeDescription
asStringsets the HTML tag for the component
hrefStringURL to be used for the Link