FAB
ExpressiveA 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
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.