App Header
A consistently available top-level element of the application interface. It contains a brand logo, application title and app-wide utility actions.
Use Nav Bar component or Sidebar Navigation component to organize the primary navigation experience.
#
Importimport { AppHeader } from '@volue/wave-react';
App Header is a compound component that consists of multiple parts:
-
AppHeader.Root
: The main wrapper that contains the header. -
AppHeader.Logo
: The logo of the application. It can be a wordmark or an icon. -
AppHeader.Title
: The title of the application. -
AppHeader.Status
: A container that displays current status or state of the application. -
AppHeader.ActionList
: The wrapper that contains all the items of the action list. -
AppHeader.ActionListItem
: The single item that represents one element of the action list. -
AppHeader.ActionListPopoverContent
: A special component to compose withPopover.Content
when rendering a nested, stackedAppHeader.ActionList
. -
AppHeader.ActionListChevronIcon
: A visual indicator that a list item contains a nestedAppHeader.ActionList
.
#
Examples#
DefaultAppHeader
should be globally persistent and include a brand logo or mark followed by the application name in text form.
It can be used to surface certain application-wide actions and other non-primary navigation items. Common use cases include user account menu, link to user documentation or help guide, notification list trigger, settings or configuration link etc.
Use App Frame component to provide basic structure and host AppHeader
inside AppFrame.AppHeader
as in the example below.
#
With status informationAppHeader.Status
is a container that can be used to display current status or state to the user (e.g., real-time connection status). Use Hint Dot component to indicate the status visually.
#
SizesAppHeader
comes in two sizes: small
and medium
. The default size is medium
.
#
LogoAppHeader.Logo
can be an icon or wordmark.
#
ActionsUse AppHeader.ActionList
as a container for one or more AppHeader.ActionListItem
components to configure application header actions.
By passing the startElement
prop, you can add icon to each action for clarity. You may also choose to display icon-only items and wrap them with Tooltip.
#
Responsive headerFor small viewport experiences, you can reduce the main AppHeader.ActionList
to a toggle item that opens Popover containing a vertically oriented AppHeader.ActionList
that displays the full action list.
App Header exposes AppHeader.ActionListPopoverContent
to compose with Popover.Content
and AppHeader.ActionListChevronIcon
to visually indicate items with nested action lists.
Hidden utility is used to control the presence of both mobile and desktop navigation experiences based on specified breakpoints.
You may also save space by using AppHeader.Logo
in a compact icon variant.
#
With routingAppHeader.ActionListItem
can be rendered as a
tag or a custom Link
component, making the integration with routing package such as React Router easy.
#
API Reference#
AppHeader.RootProp | Type | Default |
---|---|---|
css | StitchesCss | No default value |
size | enum | "medium" |
#
AppHeader.LogoProp | Type | Default |
---|---|---|
as | enum | div |
css | StitchesCss | No default value |
label | string | No default value |
variant | enum | "wordmark" |
#
AppHeader.TitleProp | Type | Default |
---|---|---|
as | enum | h1 |
css | StitchesCss | No default value |
#
AppHeader.StatusProp | Type | Default |
---|---|---|
as | enum | div |
css | StitchesCss | No default value |
#
AppHeader.ActionListProp | Type | Default |
---|---|---|
css | StitchesCss | No default value |
size | enum | "medium" |
flow | enum | "row" |
#
AppHeader.ActionListItemProp | Type | Default |
---|---|---|
as | enum | button |
css | StitchesCss | No default value |
startElement | React.ReactElement | No default value |
endElement | React.ReactElement | No default value |
isActive | boolean | false |
isDisabled | boolean | false |
tone | enum | No default value |
#
AppHeader.ActionListPopoverContentProp | Type | Default |
---|---|---|
css | StitchesCss | No default value |
#
AppHeader.ActionListChevronIconProp | Type | Default |
---|---|---|
css | StitchesCss | No default value |