Appearance

The FloatingActionButton component provides many predefined appearance options such as different shapes, sizes and theme colors.

Theme Color

The FloatingActionButton allows you to specify predefined theme colors.

The available themeColor values are:

  • primary (Default)Applies coloring based on the primary theme color.
  • secondaryApplies coloring based on the secondary theme color.
  • tertiaryApplies coloring based on the tertiary theme color.
  • infoApplies coloring based on the info theme color.
  • successApplies coloring based on the success theme color.
  • warningApplies coloring based on the warning theme color.
  • errorApplies coloring based on the error theme color.
  • darkApplies coloring based on the dark theme color.
  • lightApplies coloring based on the light theme color.
  • inverseApplies coloring based on the inverted theme color.
  • nullDoes not set a theme color className.
Example
View Source
Edit In Stackblitz  
Change Theme:

Shape

The FloatingActionButton allows you to set different shapes.

The available shape values are:

  • rectangleApplies no border radius on the FloatingActionButton.
  • squareApplies square shape on the FloatingActionButton.
  • nullDoes not set a shape className.
Example
View Source
Edit In Stackblitz  
Change Theme:

Size

The FloatingActionButton allows you to set different sizes.

The available size values are:

  • smallApplies half of the default padding, e.g. 8px.
  • medium (Default)Applies the default padding, e.g. 16px.
  • largeApplies one and one half of the default padding, e.g. 24px.
  • nullDoes not set a size className.
Example
View Source
Edit In Stackblitz  
Change Theme:

Rounded

The FloatingActionButton allows you to set different rounding options.

The available rounded values are:

  • small
  • medium (Default)
  • large
  • full
  • nullDoes not set a theme color className.
Example
View Source
Edit In Stackblitz  
Change Theme:

In this article

Not finding the help you need?