Skip to content

Fab ​

Fab is the main action of a small screen, floating over the stage.

When to use ​

Use it on a narrow screen, where the toolbars do not show the main action, once per screen. Do not show it while a modal is open: the modal's primary action is the filled one then.

Props ​

PropDefaultDescription
labelrequiredThe name of the action
iconrequiredAn icon name or an icon component
onclickCalled when pressed
disabledfalseNot pressable, without hue
topThe distance from the top edge: 0 or a gap step
rightmdThe distance from the right edge
bottommdThe distance from the bottom edge
leftThe distance from the left edge

Contract ​

A square as tall as a button, with square corners, the solid fill and a strong line, and its icon in the color on the fill; hover and press darken the fill one step each. It is placed absolutely in its positioned container; top frees the bottom and left frees the right. Disabled, it takes the solid-disabled surface and its text, as a disabled primary Button.

Example ​

Fab

Released under the Apache-2.0 license.