Page header
Page header
Component demo
Interactive example
Latte recipe
<ic-page-headerheading="Latte recipe"subheading="A Latte is a popular Italian coffee, made with espresso, steamed milk and a thin layer of foam."reverse-order="true"><ic-chipslot="heading-adornment"label="BETA"size="large"></ic-chip><ic-buttonslot="actions"variant="primary"> Create coffee</ic-button><ic-buttonslot="actions"variant="tertiary"> Filter coffee</ic-button><ic-stepperslot="stepper"><ic-stepheading="Warm kettle"type="completed"></ic-step><ic-stepheading="Warm milk"subheading="Optional"type="completed"></ic-step><ic-stepheading="Pour milk"type="current"></ic-step></ic-stepper><ic-text-fieldslot="input"placeholder="Search for ingredients…"label="Input"hide-label="true"></ic-text-field></ic-page-header>
<IcPageHeaderheading="Latte recipe"subheading="A Latte is a popular Italian coffee, made with espresso, steamed milk and a thin layer of foam."reverseOrder><IcChipslot="heading-adornment"label="BETA"size="large"/><IcButtonslot="actions"variant="primary"> Create coffee</IcButton><IcButtonslot="actions"variant="tertiary"> Filter coffee</IcButton><IcStepperslot="stepper"><IcStepheading="Warm kettle"type="completed"/><IcStepheading="Warm milk"subheading="Optional"type="completed"/><IcStepheading="Pour milk"type="current"/></IcStepper><IcTextFieldslot="input"placeholder="Search for ingredients…"label="Input"hideLabel/></IcPageHeader>
Page header details
Props
All components also accept native properties supported by the DOM, such asclassName
and
style
.
|
|
|
---|---|---|
|
The alignment of the page header. |
|
|
If |
|
|
The title to render on the page header. |
|
|
If |
|
|
The size of the page header component. |
|
|
If |
|
|
If |
|
|
The subtitle to render on the page header. |
|
The alignment of the page header. |
If |
The title to render on the page header. |
If |
The size of the page header component. |
If |
If |
The subtitle to render on the page header. |
Slots
A slot allows for any type of element or markup to be passed into and rendered within a web component. This creates more flexibility than using a prop which must take a specific type of data.
Content can be slotted into a component by adding it as a top-level child of the component.
Slots can have a name to identify them. These specify which slot the content will be inserted into, and therefore where it will be rendered and how it will be used within the component. The name of the slot to be used can be specified by passing it via a
slot
attribute on the slotted content.
|
|
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CSS Custom Properties
|
|
---|---|
|
|
|
Variants
Size small
Interactive example
Latte recipe
<ic-page-headersize="small"heading="Latte recipe"subheading="A Latte is a popular Italian coffee, made with espresso, steamed milk and a thin layer of foam."></ic-page-header>
<IcPageHeadersize="small"heading="Latte recipe"subheading="A Latte is a popular Italian coffee, made with espresso, steamed milk and a thin layer of foam."/>
With breadcrumb navigation
Interactive example
Latte recipe
<ic-page-headerheading="Latte recipe"subheading="A Latte is a popular Italian coffee, made with espresso, steamed milk and a thin layer of foam."><ic-chipslot="heading-adornment"label="BETA"size="large"></ic-chip><ic-breadcrumb-groupslot="breadcrumbs"><ic-breadcrumbcurrent="true"page-title="Drinks"href="#"></ic-breadcrumb><ic-breadcrumbpage-title="Coffees"href="#"></ic-breadcrumb><ic-breadcrumbpage-title="Latte"href="#"></ic-breadcrumb></ic-breadcrumb-group></ic-page-header>
<IcPageHeaderheading="Latte recipe"subheading="A Latte is a popular Italian coffee, made with espresso, steamed milk and a thin layer of foam."><IcChipslot="heading-adornment"label="BETA"size="large"/><IcBreadcrumbGroupslot="breadcrumbs"><IcBreadcrumbpageTitle="Drinks"href="#"/><IcBreadcrumbpageTitle="Coffees"href="#"/><IcBreadcrumbcurrentpageTitle="Latte"href="#"/></IcBreadcrumbGroup></IcPageHeader>
With actions, input and stepper
Interactive example
Latte recipe
<ic-page-headerheading="Latte recipe"subheading="A Latte is a popular Italian coffee, made with espresso, steamed milk and a thin layer of foam."reverse-order="true"><ic-chipslot="heading-adornment"label="BETA"size="large"></ic-chip><ic-buttonslot="actions"variant="primary">Create coffee</ic-button><ic-buttonslot="actions"variant="tertiary">Filter coffee</ic-button><ic-stepperslot="stepper"><ic-stepheading="Warm kettle"type="completed"></ic-step><ic-stepheading="Warm milk"subheading="Optional"type="completed"></ic-step><ic-stepheading="Pour milk"type="current"></ic-step></ic-stepper><ic-text-fieldslot="input"placeholder="Search for ingredients…"label="Input"hide-label="true"/></ic-page-header>
<IcPageHeaderheading="latte recipe"subheading="A Latte is a popular Italian coffee, made with espresso, steamed milk and a thin layer of foam."reverseOrder><IcChipslot="heading-adornment"label="BETA"size="large"/><IcButtonslot="actions"variant="primary"> Create coffee</IcButton><IcButtonslot="actions"variant="tertiary"> Filter coffee</IcButton><IcStepperslot="stepper"><IcStepheading="Warm kettle"type="completed"/><IcStepheading="Warm milk"subheading="Optional"type="completed"/><IcStepheading="Pour milk"type="current"/></IcStepper><IcTextFieldslot="input"placeholder="Search for ingredients…"label="Input"hideLabel/></IcPageHeader>
With actions, input and tabs
Interactive example
Latte recipe
<ic-page-headerheading="Latte recipe"subheading="A Latte is a popular Italian coffee, made with espresso, steamed milk and a thin layer of foam."reverse-order="true"><ic-chipslot="heading-adornment"label="BETA"size="large"></ic-chip><ic-buttonslot="actions"variant="primary">Create coffee</ic-button><ic-buttonslot="actions"variant="tertiary">Filter coffee</ic-button><ic-text-fieldslot="input"placeholder="Search for ingredients…"label="Input"hide-label="true"></ic-text-field><ic-navigation-itemslot="tabs"label="Method"href="#"selected="true"></ic-navigation-item><ic-navigation-itemslot="tabs"label="Ingredients"href="#"></ic-navigation-item></ic-page-header>
<IcPageHeaderheading="Latte recipe"subheading="A Latte is a popular Italian coffee, made with espresso, steamed milk and a thin layer of foam."reverseOrder><IcChipslot="heading-adornment"label="BETA"size="large"/><IcButtonslot="actions"variant="primary"> Create coffee</IcButton><IcButtonslot="actions"variant="tertiary"> Filter coffee</IcButton><IcTextFieldslot="input"placeholder="Search for ingredients…"label="Input"hideLabel/><IcNavigationItemslot="tabs"label="Method"href="#"selected/><IcNavigationItemslot="tabs"label="Ingredients"href="#"/></IcPageHeader>
With React Router
Interactive example
Latte recipe
<MemoryRouterinitialEntries={["/"]}><IcPageHeaderheading="Latte recipe"subheading="A Latte is a popular Italian coffee, made with espresso, steamed milk and a thin layer of foam."reverseOrder><IcChipslot="heading-adornment"label="BETA"size="large"/><IcButtonslot="actions"variant="primary">Create coffee<SlottedSVGslot="icon"width="24"height="24"viewBox="0 0 24 24"fill="none"xmlns="http://www.w3.org/2000/svg"><pathd="M19 13H13V19H11V13H5V11H11V5H13V11H19V13Z"fill="currentColor"/></SlottedSVG></IcButton><IcButtonslot="actions"variant="tertiary">Filter coffee</IcButton><IcNavigationItemslot="tabs"selected><NavLinkslot="navigation-item"to="/">Method</NavLink></IcNavigationItem><IcNavigationItemslot="tabs"><NavLinkslot="navigation-item"to="/favourites">Ingredients</NavLink></IcNavigationItem><IcTextFieldslot="input"placeholder="Search for ingredients…"label="Input"hideLabelclass={classes.textField}/></IcPageHeader><IcSectionContainer><Routes><Routepath="/"element={<IcTypography>This page is about our Latte making methods</IcTypography>}/><Routepath="/favourites"element={<IcTypography>This page is about the ingredients used in our Latte</IcTypography>}/></Routes></IcSectionContainer></MemoryRouter>
With Slots
Interactive example
<ic-page-header><ic-typographyvariant="h1"slot="heading">Latte recipe</ic-typography><ic-typographyslot="subheading">A Latte is a popular Italian coffee, made with espresso, steamed milk and a thin layer of foam.</ic-typography><ic-chipslot="heading-adornment"label="BETA"size="large"></ic-chip><ic-breadcrumb-groupslot="breadcrumbs"><ic-breadcrumbcurrent="true"page-title="Drinks"href="#"></ic-breadcrumb><ic-breadcrumbpage-title="Coffees"href="#"></ic-breadcrumb><ic-breadcrumbpage-title="Latte"href="#"></ic-breadcrumb></ic-breadcrumb-group><ic-text-fieldslot="input"placeholder="Search for ingredients…"label="Input"hide-label="true"/></ic-page-header>
<IcPageHeader><IcTypographyvariant="h1"slot="heading"> Latte recipe</IcTypography><IcTypographyslot="subheading"> A Latte is a popular Italian coffee, made with espresso, steamed milk and a thin layer of foam.</IcTypography><IcChipslot="heading-adornment"label="BETA"size="large"/><IcBreadcrumbGroupslot="breadcrumbs"><IcBreadcrumbpageTitle="Drinks"href="#"/><IcBreadcrumbpageTitle="Coffees"href="#"/><IcBreadcrumbcurrentpageTitle="Latte"href="#"/></IcBreadcrumbGroup><IcTextFieldslot="input"placeholder="Search for ingredients…"label="Input"hideLabel/></IcPageHeader>