Version 0.7.0 - Alpha
HeaderPage
Component

HeaderPage

A header page component for the plugin that should sit under the Header component.

Home

Page Title

Usage

import { HeaderPage } from '@backstage/ui';

<HeaderPage />

API reference

PropTypeDefaultResponsive
title
string
Your pluginNo
customActions
ReactNode
-No
menuItems
-No
tabs
-No
breadcrumbs
-No
children
ReactNode
-No
className
string
-No
style
CSSProperties
-No

Examples

With Breadcrumbs

You can add breadcrumbs to the header page to help users navigate to the previous page. The breadcrumbs prop is an array of objects with a label and href property. By default we truncate the breadcrumb label to 240px.

<HeaderPage
  title="Page Title"
  breadcrumbs={[
    { label: 'Home', href: '/' },
    { label: 'Long Breadcrumb Name', href: '/long-breadcrumb' },
  ]}
/>

With Tabs

You can add tabs to the header page to help users navigate to the different sections of the page. The tabs prop is an array of objects with a label and href property.

Page Title

<HeaderPage
  title="Page Title"
  tabs={[
    { id: 'overview', label: 'Overview', href: '/overview' },
    { id: 'checks', label: 'Checks', href: '/checks' },
    { id: 'tracks', label: 'Tracks', href: '/tracks' },
    { id: 'campaigns', label: 'Campaigns', href: '/campaigns' },
    { id: 'integrations', label: 'Integrations', href: '/integrations' },
  ]}
/>

With Custom Actions

You can add custom actions to the header page to help users navigate to the different sections of the page. The customActions prop is a React node.

Page Title

<HeaderPage
  title="Page Title"
  customActions={<Button>Custom action</Button>}
/>

With Menu Items

You can add menu items to the header page to help users navigate to the different sections of the page. The menuItems prop is an array of objects with a label, value and onClick property.

<HeaderPage
  title="Page Title"
  menuItems={[
    { label: 'Settings', value: 'settings', onClick: () => {} },
    { label: 'Invite new members', value: 'invite-new-members', onClick: () => {} },
  ]}
/>

Theming

Our theming system is based on a mix between CSS classes, CSS variables and data attributes. If you want to customise this component, you can use one of these class names below.

Changelog