lightdarkdefaultcompact
Getting StartedInstallationChangelogSupportGithubFrameworksAngularVueReactDemosFoundationThemesTypographyIconsPopoversInternationalizationDrag and DropKeyboard NavigationLayoutGetting StartedBlockInlineGridComponentsAccordionAlertAlert GroupBadgeBreadcrumbButtonButton GroupButton ExpandButton HandleButton IconButton ResizeButton SortCardChatCheckboxColorData GridDateDialogDividerDrawerDropdownFileFormat DatetimeFormat NumberFormsForm InteractionsForm ValidationHeaderInputMenuMonthNavPaginationPasswordProgress BarProgress CircleProgress DotRadioRangeRatingSearchSelectStepperSwitchTabsTagTextareaTimeToastToggletipTooltipTreeData GridGetting StartedFooterPlaceholderAsyncResponsiveHeightPaginationBordersHoverLayerRange SelectionCSVColumn AlignmentColumn WidthColumn FixedColumn StickyColumn VisibilityColumn GroupsColumn SpanColumn ResizeDraggable ColumnsDraggable RowsRow HeaderRow Multi SelectRow Single SelectRow HeightRow ActionRow Action BulkRow StickyRow StripeRow FixedRow SortRow Groups

The header component is used to provide a consistent and recognizable top bar, typically containing a logo and main navigation.

Example

headeritemitemlink
code
<script type="module">
  import '@blueprintui/components/include/header.js';
</script>

<bp-header>
  <bp-header-item>header</bp-header-item>
  <bp-header-item bp-layout="inline:end">item</bp-header-item>
  <bp-header-item>item</bp-header-item>
  <bp-header-item><a href="#">link</a></bp-header-item>
</bp-header>

Install

NPM

// npm package
import '@blueprintui/components/include/header.js';

CDN

<script type="module">
  import 'https://cdn.jsdelivr.net/npm/@blueprintui/components/include/header.js/+esm';
</script>

Accessibility

  • The header logo image should have alternative text for screen readers.
  • The main navigation should be keyboard accessible, allowing users to navigate through the items using the tab key and activating them with the enter or space key.

bp-header

Properties

NameTypesDescription

CSS Properties

NameTypesDescription
--padding
--background
--color
--height
--font-size
--gap

Slots

NameTypesDescription
defaultbadge content