Components Buttons: Floating Action Button

Buttons: Floating Action Button

A floating action button represents the primary action in an application.

A floating action button is used for a promoted action.

Shaped like a circled icon floating above the UI, it changes color upon focus and lifts upon selection. When pressed, it may contain more related actions.

Usage

Only one floating action button is recommended per screen to represent the most common action.

Behavior

It animates onto the screen as an expanding piece of material, by default.

Sizes

Default: 56 x 56dp
Mini: 40 x 40dp

Material Design floating action button for primary actions

Floating action button Expand and collapse content An arrow that points down when collapsed and points up when expanded.

Floating action button

Floating action buttons are used for a promoted action. They are distinguished by a circled icon floating above the UI and have motion behaviors that include morphing, launching, and a transferring anchor point.

Floating action buttons come in two sizes:

  • Default size: For most use cases
  • Mini size: Only used to create visual continuity with other screen elements

The button size should change from the default (56dp) to the mini size (40dp) when the screen width is 460dp or less.

Material Design floating action button

Floating action button

Mini floating action button in Material Design

Mini floating action button

The floating action button should be placed 16dp minimum from the edge on mobile and 24dp minimum on tablet/desktop.

Material Design floating action button

Floating action button

Interior icon: 24 x 24dp
Floating action button circle: 56 x 56dp

Mini floating action button in Material Design

Mini floating action button

Interior icon: 24 x 24dp
Floating action button circle: 40 x 40dp

The floating action button changes color on focus and lifts upon being selected.

Floating action button gaining focus

Floating action button being selected

Not every screen needs a floating action button. A floating action button represents the primary action in an application.

Touch images in a gallery with Material Design

Do.

The primary action is to touch images in a gallery, so no button is needed.

Add files using Material Design

Do.

The primary action is to add files.

Only one floating action button is recommended per screen to increase its prominence. It should represent only the most common action.

Single floating action button for prominence in Material Design

Don’t.

Single floating action button for prominence in Material Design

Don’t.

Qualities

Make floating action buttons positive actions like Create, Favorite, Share, Navigate, and Explore.

Material Design floating action buttons for positive actions

Do.

Avoid using floating action buttons for minor and destructive actions, including the following:

  • Archive or Trash
  • Nonspecific actions
  • Alerts or errors
  • Limited tasks like cutting text
  • Controls that should be in a toolbar, like volume control or changing a font color

Floating action buttons don’t contain app bar icons or status bar notifications. Don’t layer badges or other elements over a floating action button.

Material Design: Avoid floating action buttons for minor actions

Don’t.

Use the circle-shaped icon consistently to enforce the primary action pattern across apps.

Circle icon for consistent Material Design primary actions

Do.

Circle icon for consistent Material Design primary actions

Don’t.

Don’t give the floating action button extra dimension.

Floating action button should be flat in Material Design

Do.

Floating action button should be flat in Material Design

Don’t.

Behavior Expand and collapse content An arrow that points down when collapsed and points up when expanded.

The floating action button animates onto the screen as an expanding piece of material, by default. The icon within it may be animated.

Floating action buttons may move differently than other UI elements because of their relative importance.

Examples of moving floating action buttons

Lateral screens

A floating action button that spans multiple lateral screens (such as tabbed screens) should briefly disappear, then reappear if its action changes.

The button should stay on screen if its action remains the same across screens (and translate to a new position, if necessary.)

Lists

Lists underneath floating action buttons should have enough padding beneath them so their content isn’t blocked by the button.

Do.

Do.

Tabbed screens

On tabbed screens, the floating action button should not exit the screen in the same direction as the content. This prevents:

  • Floating action buttons from appearing functional when they aren’t
  • The perception that the floating action button is at the same the elevation as the content

Don’t.

Don’t.

Transitions Expand and collapse content An arrow that points down when collapsed and points up when expanded.

Transitions

The floating action button is a unique example of a primary use case in an app. Take advantage of its visibility to create delightful transitions for a primary UI element.

Common transitions include Trigger, Toolbar, Speed dial, and Morphing. This is not an exhaustive list. Floating action buttons are designed to be flexible. Experiment with transitions that best suit your app and the screens on which the button sits.

Trigger

The floating action button can simply trigger an action or navigate somewhere. The animation of the touch ripple expands outwards as the force that causes changes to the UI.

A floating action button can simply trigger an action.

A floating action button recentering a map view

Apps typically use a single floating action button. However, this example uses two floating action buttons because they perform equally important yet distinct actions.

Toolbar

The floating action button can transform into a toolbar upon press or from a toolbar upon scroll. The toolbar can contain related actions, text and search fields, or any other items that would be useful at hand.

A floating action button transforming into a toolbar

A floating action button transforming into a toolbar.

A toolbar that disappears on scroll is particularly useful for screens where the full toolbar is needed upon initial entry or while at the top or bottom of a long list. This saves screen real estate when the user has signaled through scrolling that they’re interested in looking at the main content.

A toolbar transforming into a floating action button upon scroll

A toolbar transforming into a floating action button upon scroll

If a floating action button morphs into a toolbar, that toolbar should contain related actions.

Button for selecting media type in Material Design

Do.

In this example, the button lets the user select the media type to add.

Material Design: Avoid unrelated or confusing actions

Don’t.

Don’t include unrelated or confusing actions.

Speed dial

The floating action button can fling out related actions upon press. The button should remain on screen after the menu is invoked. Tapping in the same spot should either activate the most commonly used action or close the open menu.

A floating action button flinging out related actions

A floating action button flinging out related actions

The floating action button can transform into a single sheet of material which contains all the actions.

A floating action button transforming into a single sheet of material

A floating action button transforming into a single sheet of material

As a general rule, have at least three options upon press but not more than six, including the original floating action button target. If you have two options – i.e. your floating action button only flings out one other choice – choose which action is most important. If you have more than six, users may have trouble reaching the furthest option.

Reduce decision fatigue by giving users the best, most distinct, and fewest options.

Material Design: Floating action button with at least three options

Don’t.

A floating action button should fling out at least three options.

Material Design: Floating action button with 6 options max

Don’t.

A floating action button should fling out no more than six options.

Don’t put overflow menus in the floating action button actions. There should be at most two taps from the initial screen to get to the intended destination.

Specific destinations for Material Design options

Do.

Options should be specific destinations.

Material Design: Avoid overflow menu in options

Don’t.

Options should not include an overflow menu.

Put overflow actions in the overflow menu in toolbars, not in floating action buttons.

Material Design: Overflow menus should be in toolbars

Do.

Overflow menus belong in toolbars.

Material Design: Overflow menus belong in toolbars

Do.

Overflow menus belong in toolbars.

Material Design: Floating action buttons, not overflow menus

Don’t.

Floating action button are not overflow menus.

Floating action button in Material Design, not overflow menus

Don’t.

Floating action button are not overflow menus.

If the hallmark of the app is adding file types, a floating action button can transform into related actions after it is first touched. However, if the actions that appear are unrelated to the button, place the actions into an overflow menu.

Material Design: Floating action button transforms to actions

Do.

A floating action button can transform into related actions.

Material Design: Floating action button should remain consistent

Don’t.

A floating action button should not transform into unrelated actions.

A floating action button can contain a list of contacts. The list shouldn’t contain unrelated actions.

Material Design: Floating action button evolves into contacts list

Do.

A floating action button can transform into a list of contacts.

Floating action button should maintain Material Design actions

Don’t.

A floating action button should not transform into unrelated actions.

Morph

The floating action button can transform into sheets of material that are part of the app structure. This dramatic transformation accentuates the action the button enables.

When morphing the floating action button, transition between starting and ending positions in a logical way. For example, do not pass through other sheets of material.

The morph animation should be reversible and transform the new sheet of material back into the floating action button.

A floating action button can morph into a sheet of material that is part of the app structure.

A floating action button can morph into a sheet of material that is part of the app structure.

Full screen

The floating action button can transform into a new sheet of material that spans the entire screen.

This type of dramatic transformation is typically associated with creating new content. As a result, it does not tend to have an method of undoing the transformation or a reversible animation.

The floating action button can transform into a new sheet of material that spans the entire screen.

The floating action button can transform into a new sheet of material that spans the entire screen.

Large Screens Expand and collapse content An arrow that points down when collapsed and points up when expanded.

Large screens

A floating action button can attach to an extended app bar.

Material Design: Floating action button on large screens

Do.

A floating action button can be attached to a toolbar or structural element within a sheet (as long as it’s not blocking other elements).

Floating action button in Material Design on toolbar

Do.

A floating action button can be attached to the edge of a sheet.

Floating action button on a sheet in Material Design

Do.

Don’t have more than one floating action button per screen.

One floating action button per screen in Material Design

Don’t.

Don’t associate floating action buttons with every element on a screen.

"Do not use Material Design floating action buttons everywhere

Don’t.