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.
Menu Items
Render a menu nav item with the HeaderBar.MenuItem component. This component must be wrapped in a Menu.
API
<HeaderBar.Root>
| Prop | Type | Default |
|---|---|---|
Allows you to replace the component's HTML element with a different tag or component. Learn more | | 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' |
| ReactElement
| ((
props: object,
) => ReactElement)
'sm' | 'lg'
| 'primary'
| 'secondary'
| Attribute / Property | Value |
|---|---|
className | 'qui-header-bar__root' |
data-size | 'sm' | 'lg' |
data-surface | | 'primary' |
className'qui-header-bar__root'data-size'sm' | 'lg'
data-surface| 'primary'
| 'secondary'
<HeaderBar.Logo>
| Prop | Type |
|---|---|
Allows you to replace the component's HTML element with a different tag or component. Learn more | | ReactElement |
| ReactElement
| ((
props: object,
) => ReactElement)
| Attribute / Property | Value |
|---|---|
className | 'qui-header-bar__logo' |
className'qui-header-bar__logo'<HeaderBar.AppTitle>
| Prop | Type |
|---|---|
Allows you to replace the component's HTML element with a different tag or component. Learn more | | ReactElement |
| ReactElement
| ((
props: object,
) => ReactElement)
| Attribute / Property | Value |
|---|---|
className | 'qui-header-bar__app-title' |
className'qui-header-bar__app-title'<HeaderBar.Nav>
| Prop | Type |
|---|---|
Allows you to replace the component's HTML element with a different tag or component. Learn more | | ReactElement |
| ReactElement
| ((
props: object,
) => ReactElement)
| Attribute / Property | Value |
|---|---|
className | 'qui-header-bar__nav' |
className'qui-header-bar__nav'<HeaderBar.NavItem>
| Prop | Type |
|---|---|
Whether the nav item is the current active route. | boolean |
| LucideIcon | |
Allows you to replace the component's HTML element with a different tag or component. Learn more | | ReactElement |
| LucideIcon |
boolean| LucideIcon
| ReactNode
LucideIcon, the size will automatically match the size prop.
Supply as a ReactElement for additional customization.| ReactElement
| ((
props: object,
) => ReactElement)
| Attribute / Property | Value |
|---|---|
className | 'qui-header-bar__nav-item' |
data-active |
className'qui-header-bar__nav-item'data-active<HeaderBar.Divider>
| Prop | Type |
|---|---|
Allows you to replace the component's HTML element with a different tag or component. Learn more | | ReactElement |
| ReactElement
| ((
props: object,
) => ReactElement)
| Attribute / Property | Value |
|---|---|
className | 'qui-header-bar__divider' |
className'qui-header-bar__divider'<HeaderBar.ActionBar>
| Prop | Type |
|---|---|
Allows you to replace the component's HTML element with a different tag or component. Learn more | | ReactElement |
| ReactElement
| ((
props: object,
) => ReactElement)
| Attribute / Property | Value |
|---|---|
className | 'qui-header-bar__action-bar' |
className'qui-header-bar__action-bar'<HeaderBar.WindowControls>
| Prop | Type |
|---|---|
Allows you to replace the component's HTML element with a different tag or component. Learn more | | ReactElement |
| ReactElement
| ((
props: object,
) => ReactElement)
| Attribute / Property | Value |
|---|---|
className | 'qui-header-bar__window-controls' |
className'qui-header-bar__window-controls'