interface AppBarContentProps {
    actionButtons?: [ActionButtonProps?, ActionButtonProps?, ActionButtonProps?];
    appBarRef: RefObject<null | HTMLElement>;
    ariaLabel?: string;
    color?: "black" | "white";
    customAttribute?: {
        attribute: string;
        value: string | number;
    };
    customRightContent?: ReactElement<any, string | JSXElementConstructor<any>>;
    dense?: boolean;
    elevated?: boolean;
    elevation?: 0 | 1 | 2;
    headingRefBottom?: number;
    hideOnScrollDown?: boolean;
    isOnImage?: boolean;
    isScrolling?: boolean;
    navigationButtons?: NavigationButtonProps;
    prominent?: boolean;
    scrimHeight?: number;
    scrollTarget?: HTMLElement;
    showBackground?: boolean;
    showBorder?: boolean;
    showTitle?: boolean;
    sx?: SxProps<Theme>;
    title: string;
    toolBarSx?: SxProps<Theme>;
    window?: (() => Window | HTMLElement);
}

Hierarchy

  • Omit<AppBarProps, "position" | "headingRef">
    • AppBarContentProps

Properties

Action buttons located on the right side of the AppBar.

appBarRef: RefObject<null | HTMLElement>
ariaLabel?: string

Aria-label for the AppBar's <nav> element. It helps screen reader users understand the purpose of this navigation section, especially when multiple <nav> elements are present on a page.

color?: "black" | "white"

Configure the title and icons to appear in either white or black.

customAttribute?: {
    attribute: string;
    value: string | number;
}

Used for tests. Clickable and requested subcomponents will be suffixed with "-[ComponentName]".

customRightContent?: ReactElement<any, string | JSXElementConstructor<any>>

Custom content on the right side of the AppBar.

dense?: boolean

Make App Bar height 56 instead of 72. Dense is true by default on breakpoints below sm.

elevated?: boolean

Show AppBar in elevated state.

elevation?: 0 | 1 | 2

Elevation of the AppBar. Used primarily in dark mode to handle modals and layers

headingRefBottom?: number

Distance from the top of the App Bar parent to end of heading.

hideOnScrollDown?: boolean

Hide App Bar when scrolling down.

isOnImage?: boolean

Display the AppBar with a gradient overlay and white text to ensure good contrast.

isScrolling?: boolean

Indicates whether the component is currently in a scrolling state.

navigationButtons?: NavigationButtonProps

Navigation buttons.

prominent?: boolean

Prominent AppBar background that requires elevated state. Default is false on mobile and true on desktop.

scrimHeight?: number

Height of the overlay scrim in pixels. Default is 125px.

scrollTarget?: HTMLElement

Specify an element to serve as the scroll target. Expects a DOM node.

showBackground?: boolean

Show AppBar background.

showBorder?: boolean

Show AppBar bottom border.

showTitle?: boolean

Show title inside AppBar.

sx?: SxProps<Theme>

The system prop that allows defining system overrides as well as additional CSS styles.

title: string

Title for elevated AppBar.

toolBarSx?: SxProps<Theme>

The system prop that allows defining system overrides as well as additional CSS styles for toolbar.

window?: (() => Window | HTMLElement)

Function that return the scroll target, which can be either an HTML element or the global Window object.