---
url: /components/app-bars/guidelines.md
description: >-
  Top app bars display navigation, actions, and text at the top of a screen.
  They contain a title and actions related to the current screen.
---

# App bars

Top app bars display navigation, actions, and text at the top of a screen. They contain a title and actions related to the current screen.

[Overview](overview.md) · [Specs](specs.md) · **Guidelines** · [Accessibility](accessibility.md)

![4 app bars with headlines and action icons.](/assets/9a65baf2-mlnt9v4x-01.DQLUZI-7.webp)

App bars show information about the page, key actions, and navigation actions like **Back** or **Menu**

## Usage

Use an app bar to provide content and actions related to the current page, such as page navigation actions, headlines, images, and 1–2 essential actions.

The information and actions in the app bar should be contextual and specific to a page, but can also include global product controls, such as search or notifications.

![App bar with navigation icon buttons and a 2-line title.](/assets/5e024fbd-mlntdon8-02.DvC8C3CH.webp)

App bars provide content and actions related to the current page

App bars should only have one action, two if necessary. 

The primary action should alter or exit the entire page, like **Send**, **Save**, or **Edit**.

If the product has many actions, place those in a [toolbar](../toolbars/overview.md "Toolbars display frequently used actions relevant to the current page."). Avoid placing an overflow menu in the app bar when possible.

![App bar with content below.](/assets/a005855f-mlnth1j3-03.BOv69j9W.webp)

App bars can display one high visibility action to boost its prominence

To boost visibility of a primary action, change the style of the icon button to filled or tonal, and consider using a wide icon button.  

Avoid using multiple filled or tonal buttons.

::: tip Do
![App bar with 1 filled button.](/assets/afaa94d9-mlntiy4b-04-do.DtY5pJnW.webp)

Use a filled or tonal button for important actions
:::

::: danger Don't
![App bar with 2 filled buttons, side by side.](/assets/6de77082-mlntjjnv-05-dont.CRxXZBFf.webp)

Don’t put multiple filled or tonal buttons in the app bar
:::

The four variants of app bars are:

1. **Search app bar**

   <br>

   Use on home pages when search is key to the product. 

   <br>
2. **Small**

   <br>

   Use in dense layouts or when a page is scrolled.

   <br>
3. **Medium flexible**

   <br>

   Use to display a larger headline. It can collapse into a small app bar on scroll.

   <br>
4. **Large flexible**

   <br>

   Use to emphasize the headline of the page.

![The 4 app bar variants.](/assets/c8209c16-mlntmieq-06.JRTCfRIB.webp)

1. Search app bar
2. Small
3. Medium flexible
4. Large flexible

### Baseline app bars

There are two baseline app bars that are no longer recommended:

1. **Medium**

   <br>

   Replace with medium flexible.

   <br>
2. **Large**

   <br>

   Replace with large flexible.

![2 baseline app bars.](/assets/635365b7-mlntnwot-07.DustRASw.webp)

1. Medium 
2. Large

## Search app bar

Use a search app bar to provide an emphasized entry-point to open the search view.

![A search bar within an app bar.](/assets/fe3c4e5c-mlntr0ls-08.DxYYyUtq.webp)

Search app bars have a search field instead of heading text

[Search bars](../search/overview.md "The search bar is a persistent and prominent search field at the top of the screen.") should always include the word **Search**. They can use various capitalization styles depending on the product.

1. **Search**
2. Searching a specific area

   <br>

   Example: **Search inbox**
3. Search \[Product] 

   <br>

   Example: **Search Photos**

![3 examples of search text in an app bar.](/assets/3bb5e126-mlntrvt2-09.CRjEljZL.webp)

Use proper capitalization depending on what’s being searched

### Buttons in search app bar

In addition to a trailing avatar, search app bars can have up to two trailing icons on mobile. 

Trailing icons can be placed inside or outside the search bar.

![2 icons placed in the search bar.](/assets/c01f600e-mlntvpyq-10.C8m9lbVZ.webp)

Put the most used actions on the left and least used on the right

The leading element of a search app bar can be used for a product’s logo to brand the app’s overall experience. <br><br>This logo can be purely cosmetic, or can trigger an action like returning to the home screen or refreshing it. 

Avoid using a logo to open an [expanded navigation rail](../navigation-rail/overview.md "Expanded navigation rails show text labels and an extended FAB, and can be default or modal.").

![A search app bar with a logo, search bar, and avatar.](/assets/1b01a3f6-mlntz91y-11.CdgWUjY8.webp)

The leading element can be a product logo

Don’t use more than two trailing icon buttons with an avatar. <br><br>If more actions are needed, place them in a [toolbar](../toolbars/overview.md "Toolbars display frequently used actions relevant to the current page.") instead.

::: danger Don't
![3 icons placed in a search app bar.](/assets/0a6ecc76-mlnu01cf-12-dont.AEb4L_m4.webp)

Don’t use three icons and an avatar in a search app bar
:::

### Large screens

The search app bar dynamically adapts to available width. There should be up to four trailing icons on larger screens.

![4 actions placed in a search app bar on a large screen.](/assets/6a5e51ce-mlnu4je0-13.DWJplgO5.webp)

Increased horizontal space on larger screens allows for up to four trailing icons.

### Alternate color options

By default, search containers in app bars use the **surface container** color to distinguish it from the app background. If the background is darker, use a lighter container color on the search bar, like **surface bright**.

When choosing alternate colors, make sure the search text and container have at least 3:1 contrast for readability.

![App bar with a light search container color.](/assets/3d790961-mlnu68g2-14.CjFxdOuT.webp)

Search app bars can use different colors, like **surface bright**, for improved contrast with surrounding elements

## Anatomy

![Diagram of app bar layout.](/assets/72e3d885-mlnub2xp-15.D86S5Gob.webp)

1. Container
2. Headline
3. Trailing icons
4. Subtitle
5. Leading button

### Container

The app bar container holds all information and actions at the top of a screen, including navigation icons, headlines, and buttons. 

Avoid changing the position or shape of the container.

<br>

::: tip Do
![App bar with square corners.](/assets/5e6012e1-mlnuf0r2-16-do.Be1e5cap.webp)

Use straight corners for app bars
:::

::: danger Don't
![App bar with curved corners.](/assets/f029aba3-mlnugbt5-17-dont.DRhvnnFy.webp)

Don’t use curved shapes. This implies that the container can expand upon interaction.
:::

Always use the default height of the app bar, and make it span the full width of the window.

::: tip Do
![App bar at default height.](/assets/34bb2c50-mlnuiiym-18-do.BGUKdYho.webp)

Default heights were chosen to ensure readability of on-screen elements
:::

::: danger Don't
![App bar with reduced height.](/assets/06b45c9c-mlnuja9a-19-don-t.SSKeU1ir.webp)

Don't make an app bar shorter than its default height
:::

### Adding logos

Image logos can be used in app bars to bolster brand identity or visual appeal. 

The image should be high quality and pertinent, and shouldn’t disrupt the app bar's functionality.

![A logo added to an app bar.](/assets/f80f0d18-mlnuliot-20.Dj77nWjb.webp)

Image logos can replace all text in small app bars, and appear above the text in other app bars

### Leading button

The leading button should be used for navigating the product. 

It typically is one of the following:

* A menu icon, which opens a modal expanded navigation rail
* A back arrow, which returns to the previous screen

![Leading navigation icon aligned on left of app bar](/assets/15eba7e1-mlnumedg-21.C7t4UsiN.webp)

1. Leading **Back** button

### Headline

The headline can describe:

* The current page
* The current section
* The product

Headline text should be brief enough to easily fit in the app bar. 

In medium flexible and large flexible app bars, the headline can wrap to a second line. 

Don’t truncate the headline text.

::: tip Do
![App bar headline text set in 2 lines.](/assets/5b58d8dc-mlnurf1u-22-do.CsSS5Kop.webp)

If headline text is long, use a medium flexible or large flexible app bar and wrap the headline to two lines maximum
:::

::: danger Don't
![Small app bar headline text wrapped on 2 lines.](/assets/8e306741-mlnus8yg-23-don-t.BB7Nas6k.webp)

Don’t wrap text in a small app bar
:::

Headlines can be aligned to the leading edge or centered.

The headline’s typography size and style change depending on the app bar variant.

![Search, small, medium and large flexible app bars with headline styles.](/assets/2a4558ee-mlnuwnod-24.DEovA_rL.webp)

Headline typography style for each app bar

1. Search: Body large
2. Small: Title large
3. Medium flexible: Headline medium
4. Large flexible: Display small

### Subtitle

Subtitles can add additional context to a page. 

These can be leading-aligned or center-aligned with the headline text.

![Small to large flexible app bars with headline and subtitle styles.](/assets/5877767e-mlnvaru4-25.BARNnVZ1.webp)

Subtitle typography style for each app bar:

1. Small: Label medium
2. Medium flexible: Label large
3. Large flexible: Title medium

### Trailing icon buttons

Up to two icon buttons can be placed after the headline, aligned to the trailing edge of the app bar. Place most-used actions closest to the leading edge.

Avoid using these buttons to open a menu with more actions. If more actions are needed, place them in a [toolbar](../toolbars/overview.md "Toolbars display frequently used actions relevant to the current page.") instead.

If changing the icon button color style to filled or tonal, only use one icon button.

![2 icons placed to right of headline, from most to least used.](/assets/b2d98d0c-mlnvbo80-26.BdX6aMXf.webp)

Put the most used actions on the left and least used on the right

Use filled icons when possible for the best visibility. Outlined icons can also be used, particularly for unselected toggle [buttons](../buttons/overview.md "Buttons let people take action and make choices with one tap.").

::: tip Do
![App bar with 2 filled icons, “save” and “download.”](/assets/68a94e59-mlnvcdyc-27-do.cIuF_fCr.webp)

Use filled icons for clear, visible actions
:::

::: warning Caution
![App bar with 2 outlined icons, “save” and “download.”](/assets/34d0a0f4-mlnvcyu3-28-caution.jKHrd5GX.webp)

Outlined icons can be used as needed, or when using toggle buttons
:::

## Adaptive design

Adaptive design allows an interface to respond or change based on context, such as the user, device, and usage. [More on adaptive design](../../foundations/layout/layout-overview/adaptive-design.md)

### Resizing

The width of the app bar container responds to the view or device width. 

It should always span 100% of the window width.

<video controls src="https://firebasestorage.googleapis.com/v0/b/design-spec/o/projects%2Fgoogle-material-3%2Fimages%2Fmlp67nmz-GM3%20-%20Top%20App-Bar%20-%20Responsive%20-%201P%20-%20v01.mp4?alt=media" aria-label="App bar resizing to wider view."></video>

The app bar’s container responds to always fill the window width

Resizing may cause actions at the trailing edge of the app bar to collapse into an overflow menu at smaller breakpoints. 

These actions become visible again at larger sizes.

<video controls src="https://firebasestorage.googleapis.com/v0/b/design-spec/o/projects%2Fgoogle-material-3%2Fimages%2Fmaco62fo-GM3_Adaptive_AppBar_Guidelines_25_IA_V01.mp4?alt=media" aria-label="Trailing icons in app bar collapse into overflow when screen size shrinks."></video>

Actions at the trailing edge collapse into an overflow menu

The search container of the search app bar should fill 100% of the space between leading and trailing app bar elements until it reaches 312dp. Then, it should only grow further to fill 50% of that space.

<video controls src="https://firebasestorage.googleapis.com/v0/b/design-spec/o/projects%2Fgoogle-material-3%2Fimages%2Fmlp6cznn-GM3%20-%20App-bar%20-%20Guidelines_31%20-%20IA%20-%20v05.mp4?alt=media" aria-label="Search app bar resizing to wider view."></video>

The search field adapts to the amount of space between other elements in the app bar

### Presentation

The app bar automatically supports right-to-left (RTL) languages by aligning the layout of elements to the leading and trailing edges of the container. 

This means that in RTL languages, the layout of the app bar is mirrored.

![App bar in RTL with Hebrew text.](/assets/a834dc68-mlp6doc5-32.ChmruRFS.webp)

The app bar’s layout is mirrored for right-to-left (RTL) languages

## Behavior

### Scrolling

App bars should initially be the same color as the background, then fill with a contrasting color on scroll to provide visual separation from the background.

The app bar can remain on a page at all times, or can hide and reappear when scrolling.

<video controls src="https://firebasestorage.googleapis.com/v0/b/design-spec/o/projects%2Fgoogle-material-3%2Fimages%2Fmlp6geio-GM3%20-%20App-bar%20-%20Guidelines%2033%20-%20v01.mp4?alt=media" aria-label="Scrolling app bar container fills with contrasting color."></video>

Upon scrolling, an app bar container fills with contrasting color to create a visual separation

To focus more on body content, consider setting the app bar container to be transparent on scroll. This allows the buttons to float above the content. 

Make sure icon buttons have a container fill. 

Consider using narrow-width [icon buttons](../icon-buttons/overview.md "Icon buttons help people take minor actions with one tap.") for actions, like **Back**, to reduce the amount of space they take up.

<video controls src="https://firebasestorage.googleapis.com/v0/b/design-spec/o/projects%2Fgoogle-material-3%2Fimages%2Fmlp6hnuc-GM3%20-%20App-bar%20-%20Guideline%2034%20-%20IA%20-%20v03.mp4?alt=media" aria-label="Medium flexible app bar compresses to transform into transparent small app bar."></video>

Upon scrolling, an app bar container remains transparent and actions inside become filled icon buttons

Selecting the search bar should open the [search view](../search/overview.md "The search view is a full-screen modal often used to display a list of search results. It can also be opened by selecting a search icon.") component.

<video controls src="https://firebasestorage.googleapis.com/v0/b/design-spec/o/projects%2Fgoogle-material-3%2Fimages%2Fmlp6jluz-GM3%20-%20App-bar%20-%20Guidelines%2034%20-%20IA%20-%20v01.mp4?alt=media" aria-label="A search app bar opening the search view component when selected."></video>

When selected, a search app bar opens a search view

When scrolled, **medium flexible** and **large flexible** app bars can transform into **small** app bars. They should remain small until the page is scrolled back to the top. Don’t transform app bars into a **search app bar**.

<video controls src="https://firebasestorage.googleapis.com/v0/b/design-spec/o/projects%2Fgoogle-material-3%2Fimages%2Fmlp6o2a1-GM3%20-%20App-bar%20-%20Guidelines%2036%20-%20v01.mp4?alt=media" aria-label="Scrolling top app bar compressing to scroll upwards or downward."></video>

The app bar can hide when scrolling up and reveal when scrolling down

<video controls src="https://firebasestorage.googleapis.com/v0/b/design-spec/o/projects%2Fgoogle-material-3%2Fimages%2Fmlp6pkl9-GM3%20-%20App-bar%20-%20Guidelines%2037%20-%20v01.mp4?alt=media" aria-label="Medium app bar compresses to transform into Compact top app bar."></video>

Medium and large flexible app bars can use the compress effect to transform into small app bars when scrolled
