Header Bar

A header bar provides a consistent navigation and branding area at the top of an application. It contains the application logo, title, navigation links, and action controls.

import {HeaderBar} from "@qualcomm-ui/react/header-bar"

Examples

Responsive Design

These examples use Tailwind container queries for mobile-first responsiveness. Tailwind is installed on our documentation sites only, and is not required to use any of our components.

Basic Usage

A typical header bar includes a logo, application title, nav items, and an action bar.

Sizes

The header bar has two sizes: sm (default) and lg. The size prop governs padding, element spacing, and height.

Surfaces

Use the surface prop to set the background color. Available options are primary (default) and secondary.

Render a menu nav item with the HeaderBar.MenuItem component. This component must be wrapped in a Menu.

API

<HeaderBar.Root>

PropTypeDefault
Allows you to replace the component's HTML element with a different tag or component. Learn more
| ReactElement
| ((
props: object,
) => ReactElement)
The size of the component and its elements. Governs padding, element spacing, and height.
'sm' | 'lg'
'sm'
The background color of the component.
| 'primary'
| 'secondary'
Type
| ReactElement
| ((
props: object,
) => ReactElement)
Description
Allows you to replace the component's HTML element with a different tag or component. Learn more
Type
'sm' | 'lg'
Description
The size of the component and its elements. Governs padding, element spacing, and height.
Type
| 'primary'
| 'secondary'
Description
The background color of the component.
PropType
Allows you to replace the component's HTML element with a different tag or component. Learn more
| ReactElement
| ((
props: object,
) => ReactElement)
Type
| ReactElement
| ((
props: object,
) => ReactElement)
Description
Allows you to replace the component's HTML element with a different tag or component. Learn more

<HeaderBar.AppTitle>

PropType
Allows you to replace the component's HTML element with a different tag or component. Learn more
| ReactElement
| ((
props: object,
) => ReactElement)
Type
| ReactElement
| ((
props: object,
) => ReactElement)
Description
Allows you to replace the component's HTML element with a different tag or component. Learn more

<HeaderBar.Nav>

PropType
Allows you to replace the component's HTML element with a different tag or component. Learn more
| ReactElement
| ((
props: object,
) => ReactElement)
Type
| ReactElement
| ((
props: object,
) => ReactElement)
Description
Allows you to replace the component's HTML element with a different tag or component. Learn more

<HeaderBar.NavItem>

PropType
Whether the nav item is the current active route.
boolean
Icon positioned after the text content. If supplied as a LucideIcon, the size will automatically match the size prop. Supply as a ReactElement for additional customization.
| LucideIcon
| ReactNode
Allows you to replace the component's HTML element with a different tag or component. Learn more
| ReactElement
| ((
props: object,
) => ReactElement)
Icon positioned before the text content. If supplied as a LucideIcon, the size will automatically match the size prop. Supply as a ReactElement for additional customization.
| LucideIcon
| ReactNode
Type
boolean
Description
Whether the nav item is the current active route.
Type
| LucideIcon
| ReactNode
Description
Icon positioned after the text content. If supplied as a LucideIcon, the size will automatically match the size prop. Supply as a ReactElement for additional customization.
Type
| ReactElement
| ((
props: object,
) => ReactElement)
Description
Allows you to replace the component's HTML element with a different tag or component. Learn more
Type
| LucideIcon
| ReactNode
Description
Icon positioned before the text content. If supplied as a LucideIcon, the size will automatically match the size prop. Supply as a ReactElement for additional customization.

<HeaderBar.Divider>

PropType
Allows you to replace the component's HTML element with a different tag or component. Learn more
| ReactElement
| ((
props: object,
) => ReactElement)
Type
| ReactElement
| ((
props: object,
) => ReactElement)
Description
Allows you to replace the component's HTML element with a different tag or component. Learn more

<HeaderBar.ActionBar>

PropType
Allows you to replace the component's HTML element with a different tag or component. Learn more
| ReactElement
| ((
props: object,
) => ReactElement)
Type
| ReactElement
| ((
props: object,
) => ReactElement)
Description
Allows you to replace the component's HTML element with a different tag or component. Learn more

<HeaderBar.WindowControls>

PropType
Allows you to replace the component's HTML element with a different tag or component. Learn more
| ReactElement
| ((
props: object,
) => ReactElement)
Type
| ReactElement
| ((
props: object,
) => ReactElement)
Description
Allows you to replace the component's HTML element with a different tag or component. Learn more