Toolbar

The Toolbar component provides a top-level navigation and action bar. It supports optional left, center, and right sections, as well as avatars and customizable appearance.

Usage

Default


const leftIcon = (
  <IconButton theme="clear" shadow="none" icon={FaArrowLeft} ariaLabel="Back" />
);
const rightIcon = (
  <IconButton theme="clear" shadow="none" icon={FaBell} ariaLabel="Notifications" />
);

<Toolbar
  title="Dashboard"
  left={leftIcon}
  right={rightIcon}
/>

Props

Data table
TypeDescription
aria-describedbystringReferences one or more elements that describe the toolbar.
aria-labelstringAccessible name for the toolbar. Prefer this over the legacy `ariaLabel` prop.
aria-labelledbystringReferences another element that labels the toolbar. Prefer this over `aria-label` when there is visible text available.
attachmentAttachmentTypeHow the toolbar attaches to the viewport or page layout. "static" | "fixed" | "sticky"
avatar{ name?: string; src?: string; size?: SizeType; shape?: "circle" | "square" | "rounded"; theme?: ThemeType; outline?: boolean; onClick?: (e: MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void; "aria-label"?: string; }Optional avatar settings displayed at the far right.
centerReactNodeContent to render in the center section, below the title if present.
centerAriaLabelstringOptional accessible label for the center section.
classNamestringOptional additional class names for styling.
data-testidstringData test ID for testing frameworks.
leftReactNodeContent to render in the left section of the toolbar.
leftAriaLabelstringOptional accessible label for the left section.
rightReactNodeContent to render in the right section of the toolbar, before the avatar.
rightAriaLabelstringOptional accessible label for the right section.
roundingRoundingTypeRounding of the component. "none" | "small" | "medium" | "large" | "full"
shadowShadowTypeShadow of the component. "none" | "light" | "medium" | "strong" | "intense"
themeThemeTypeThe visual theme of the toolbar. "primary" | "secondary" | "tertiary" | "quaternary" | "clear"
titlestringOptional title displayed in the center section.
titleClassNamestringOptional additional class name for the toolbar title element. Useful when consumers need to style the title directly.
titleIdstringOptional id used for the rendered title element. Useful for linking the toolbar with `aria-labelledby`.