Content Header
<wa-content-header>
Content headers introduce a page or major content region and align its contextual controls and actions.
Examples
Back navigation
Set show-back-button to show an accessible back action. Listen for wa-navigate to perform the navigation.
Context controls
Place primary context controls in the inputs slot. Choose their appearance through the controls' public interfaces.
Additional actions
The addons slot aligns page-level actions to the inline end.
API
Importing
If you're using the autoloader or a hosted project, components load on demand — no manual import needed. To cherry-pick a component manually, use one of the following snippets.
Import this component directly from the CDN:
import 'https://cdn.yoummday.com/packages/@yoummday/webawesome/0.5.1/dist/components/content-header/content-header.js';
After installing Web Awesome via npm, import this component:
import '@yoummday/webawesome/dist/components/content-header/content-header.js';
If you're self-hosting Web Awesome, import this component from your server:
import './webawesome/dist/components/content-header/content-header.js';
To import this component for React 18 or below, use the following code:
import WaContentHeader from '@yoummday/webawesome/dist/react/content-header/index.js';
Slots
Learn more about using slots.
| Name | Description |
|---|---|
| (default) | The page title. |
addons
|
Additional actions aligned to the inline end. |
inputs
|
Context controls displayed after the title. |
Attributes & Properties
Learn more about attributes and properties.
| Name | Description | Reflects |
|---|---|---|
showBackButtonshow-back-button |
Shows a back button before the heading.
Type
boolean
Default
false
|
Events
Learn more about events.
| Name | Description |
|---|---|
wa-navigate |
Emitted when the back button is activated. |
CSS Parts
Learn more about CSS parts.
| Name | Description | CSS selector |
|---|---|---|
addons |
The additional-actions slot. |
::part(addons)
|
back-button |
The back button. |
::part(back-button)
|
content-header |
The component's flex container. |
::part(content-header)
|
heading |
The heading element. |
::part(heading)
|
inputs |
The context-controls slot. |
::part(inputs)
|
base |
Deprecated alias for the component's flex container. |
::part(base)
|
Dependencies
This component automatically imports the following elements. Sub-dependencies, if any exist, will also be included in this list.