OneCX PageHeader
Overview
This document aims to showcase how to use the PageHeader component.
This component should be used for creating a header for the pages. Please, visit the storybook page for the PageHeader component and interact with the examples to find out if the component is suitable for the desired use-case.
Customization
The PageHeader component allows to customize its content:
-
control header title, subtitle and figure
-
display page details
-
display action buttons and menu items
To find out how to work with PageHeader component, please visit the storybook page and interact with the examples to find out the required features. For more in-depth information on the PageHeader component interface, please access further documentation.
Inputs
Input name | Type | Default | Description |
---|---|---|---|
|
|
- |
Header title. |
|
|
|
If component is in loading state. Set to |
|
|
|
If header figure should be visible. Set to |
|
|
- |
Image URL to be displayed in the header figure. |
|
|
- |
Header subtitle. |
|
|
- |
Array of actions available in the header in form of a button or a menu item. |
|
- |
Array of detail items to be displayed in the header. |
|
|
|
|
If breadcrumbs should be visible. |
|
|
|
If breadcrumbs should be set manually. By default BreadcrumbService will generate breadcrumbs based on the router state. Set to |
|
|
- |
If grid view should be enabled. Set to |
|
|
- |
The amount of columns for grid view. |
|
|
|
Deprecated. |
|
|
|
Deprecated. |
Types
Action
Action type is used to create:
-
action buttons in the header (use
show: 'always'
) -
action menu item in the
more actions
button in the header (useshow: 'asOverflow'
)
Property | Type | Description |
---|---|---|
|
|
Identifier of the action button or menu item. |
|
|
Action button or menu item text. |
|
|
Translation key for action button or menu item text. Has higher priority than |
|
|
Icon of the action button or menu item . |
|
|
Permission for the action. If user does not have this permission, the action will not be shown. |
|
|
Action button or menu item tooltip text. |
|
|
Translation key for action button or menu item tooltip text. |
|
|
Text for the aria label of the action button. Used for actions with |
|
|
Translation key for the aria label of the action button. Used for actions with |
|
|
Callback to be used when the button is clicked or the menu item is chosen. |
|
|
If action button or menu item should be disabled. |
|
|
Tooltip for the disabled action button. |
|
|
Translation key for the tooltip of the disabled action button. Has higher priority than |
|
|
Action button display control. Use |
|
|
If action should be visible on condition resolved in |
|
|
If |
|
|
Deprecated. |
ObjectDetailItem
ObjectDetailItem is used to define the detail item to be displayed for the page in the header. The detail item has a label and can have a value as well as action button.
Property |
Type |
Description |
`label |
|
Text for the detail label. Use |
`value? |
|
Text for the detail value. Use |
`labelTooltip? |
|
Text for the detail label tooltip. |
`valueTooltip? |
|
Text for the detail value tooltip. |
`icon? |
|
Icon displayed before the detail value. |
`iconStyleClass? |
|
Style of the icon element. |
`labelPipe? |
|
Pipe used to transform the detail label provided via |
`valuePipe? |
|
Pipe used to transform the detail value provided via |
`valuePipeArgs? |
|
Arguments for the Pipe provided via |
`valueCssClass? |
|
String containing css classes to be used for displaying the detail value. |
`actionItemIcon? |
|
Icon for the detail item action button. |
`actionItemCallback? |
|
Callback to be used when the detail item action button is clicked. |
`actionItemTooltip? |
|
Text for the detail action button tooltip. |
`actionItemAriaLabelKey? |
|
Translation key for the the aria label of the detail action button. |
`actionItemAriaLabel? |
|
Text for the aria label of the detail action button. |
[.line-through]`tooltip? |
|
Deprecated. Use |