Skip to content

FAB

Expressive

A screen's single most important action, as an icon or an extended label.

import { Fab, ExtendedFab } from '@windmorph/react';

Purpose

A floating action button represents the single most important action on a screen, such as compose or create. Use at most one per screen. Fab shows an icon; ExtendedFab adds a label and can collapse to the icon as the page scrolls.

FABs have no disabled state in M3 — if an action is unavailable, hide the FAB or keep it enabled and handle the empty case.

M3 recommends the medium FAB (size="md", 80px) for most layouts. The default size stays the 56px FAB, as in Compose, so set md unless the screen is dense. Don't put an extended FAB beside a floating toolbar; pair the toolbar with a FAB (a development warning flags an extended one).

In compact and medium windows, place the FAB at the bottom trailing corner with 16px margins (fixed end-4 bottom-4). In expanded windows, consider the upper start corner, such as the navigation rail's header; a FAB nested in another component rests at level 0, so give it elevation="flat".

Do and don't

Do: Use one FAB per screen, for the screen's most important action.
Don't: Don't show several FABs on one screen.
Do: Use a FAB for a primary, positive action, with a clear icon such as add or edit.
Don't: Don't use a FAB for a minor, unclear or destructive action.

When not to use

For secondary actions use a Button or IconButton; a screen has one FAB at most.

See also

  • FAB on m3.material.io: Material's own guidelines, with anatomy and specs.
  • FAB menu: A FAB that opens two to six related actions above it, or a menu on the web.
  • Icon button: A compact icon-only action; requires an accessible name.
  • Button: Five variants and five sizes for text actions, with a toggle form and a press morph.