A plugin header with icon, title, custom actions, and navigation tabs.
import { PluginHeader } from '@backstage/ui';
<PluginHeader title="My plugin" />| Prop | Type | Default | Description |
|---|---|---|---|
| icon | ReactNode | - | Icon displayed before the title. |
| title | string | - | Main heading text for the header. |
| titleLink | string | - | URL the title links to when clicked. |
| customActions | ReactNode | - | Custom elements rendered in the toolbar area. |
| tabs | - | Navigation tabs displayed below the toolbar. | |
| onTabSelectionChange | (key: Key) => void | - | Handler called when the selected tab changes. |
| className | string | - | Additional CSS class name for custom styling. |
<PluginHeader
title="My plugin"
titleLink="/"
customActions={
<>
<ButtonIcon variant="tertiary" icon={<RiCloudy2Line />} />
<ButtonIcon variant="tertiary" icon={<RiEmotionHappyLine />} />
<ButtonIcon variant="tertiary" icon={<RiHeartLine />} />
</>
}
/>Tabs use React Router and highlight automatically based on the current route.
Combine with Header for multi-level navigation.
<PluginHeader
title="My plugin"
titleLink="/"
tabs={[
{ id: 'overview', label: 'Overview', href: '/overview' },
{ id: 'checks', label: 'Checks', href: '/checks' },
]}
/>
<Header
title="Page title"
tabs={[
{ id: 'banana', label: 'Banana', href: '/banana' },
{ id: 'apple', label: 'Apple', href: '/apple' },
]}
customActions={<Button>Custom action</Button>}
/>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.
bui-PluginHeaderbui-PluginHeaderToolbarbui-PluginHeaderToolbarContentbui-PluginHeaderToolbarControlsbui-PluginHeaderToolbarIconbui-PluginHeaderToolbarNamebui-PluginHeaderTabsWrapperMigrated all components from useStyles to useDefinition hook. Exported OwnProps types for each component, enabling better type composition for consumers. #33050
Fixed PluginHeader to avoid triggering ResizeObserver loop completed with undelivered notifications warnings when used in layouts that react to the header height, such as pages that use FullPage. #33368
Fixed tab matchStrategy matching to ignore query parameters and hash fragments in tab href values. Previously, tabs with query params in their href (e.g., /page?group=foo) would never show as active since matching compared the full href string against location.pathname which never includes query params. #33047
Merged the internal PluginHeaderToolbar component into PluginHeader, removing the separate component and its associated types (PluginHeaderToolbarOwnProps, PluginHeaderToolbarProps) and definition (PluginHeaderToolbarDefinition). This is an internal refactor with no changes to the public API of PluginHeader. #33085
Breaking Renamed the Header component to PluginHeader for clarity.
The following exports have been renamed:
Header → PluginHeaderHeaderProps → PluginHeaderPropsHeaderDefinition → PluginHeaderDefinitionThe HeaderTab type is unchanged as it is shared with HeaderPage.
CSS class names have been updated from bui-Header* to bui-PluginHeader*. #32875
Migration Guide:
-import { Header, HeaderDefinition } from '@backstage/ui';
+import { PluginHeader, PluginHeaderDefinition } from '@backstage/ui';
-<Header title="My plugin" />
+<PluginHeader title="My plugin" />
Breaking Changed className prop behavior to augment default styles instead of being ignored or overriding them.
If you were passing custom className values to any of these components that relied on the previous behavior, you may need to adjust your styles to account for the default classes now being applied alongside your custom classes. #31496