Vivid API

Fab

Floating Action Button (FAB) is an action button that floats above the user interface and should be used for actions that stands out among the rest of the UI.

Label

The label attribute controls Fab’s label text.

Connotation

The connotation attribute controls the purpose of the Fab, expressed in its colors.

Icon

Use the icon slot to add an icon from the icon library. You can render it on the leading side (default) or trailing side (icon-trailing).

Icon Only

If the label is omitted, the Fab will be displayed as an icon-only Fab.

When an element has no visible text, provide an accessible name using the aria-labelattribute. This ensures screen reader users can understand the element’s purpose, even when it’s represented only by an icon or visual styling.

Size

The size attribute controls the size of the Fab.

Disabled

The disabled attribute disables the Fab and indicates that the action is not available.

Disabled buttons should be used with caution. Read our guidelines for when to disabled buttons.