DXC Logo
Halstack Design System
v16.1.0

Header

The header is a structural component placed at the top of the interface. It provides global access to navigation, branding, and user actions, ensuring consistency and orientation across products and applications.

The header is part of the application layout, so it can only be used inside of it. Please check the DxcApplicationLayout documentation.

Props

NameTypeDescriptionDefault
New
appTitle
stringString used to configure the header application title.-
New
navItems
(GroupItem | Item)[]Array of navigation items to be displayed in the header navigation menu. Each item can be a single/simple item or a group item.

Being Item an object with the following properties:

{ badge?: ReactElement; icon?: string | SVG; label: string; onSelect?: () => void; selected?: boolean; href?: string; renderItem?: (props: { children: ReactNode }) => ReactNode; }

The renderItem property allows wrapping the item with custom routing components (e.g., Next.js Link) that require children to be passed.

and GroupItem an object with the following properties:

{ badge?: ReactElement; icon?: string | SVG; label: string; items: (Item)[]; }
Group items will ignore any nested group items to maintain a maximum of two levels in the navigation menu. When responsive, navigation items will be displayed in a vertical menu below the header in a vertical layout.
-
New
responsiveBottomContent
React.ReactNodeThe content rendered in the bottom part of the header menu under the navigation items when in responsive mode.-
New
sideContent
React.ReactNode | (isResponsive: boolean) => React.ReactNodeContent to be displayed on the right side of the header. It can be a ReactNode or a function that receives a boolean indicating if the header is in responsive mode and returns a ReactNode.

Examples

Header in application layout