New to Kendo UI for Angular? Start a free 30-day trial

FloatingActionButton Positioning

Updated on Nov 6, 2026

The FloatingActionButton provides options for aligning and positioning it in relation to the browser viewport or a CSS containing block. The positionMode input defines the positioning context, while the align and offset inputs place the button and fine-tune its distance from the edges.

Position Mode

The FloatingActionButton can be positioned in one of two ways, depending on positionMode:

  • fixed (Default)—Positions the FloatingActionButton relative to the viewport. It stays in the same place when the page scrolls.
  • absolute—Positions the FloatingActionButton relative to the nearest positioned ancestor. If no positioned ancestor exists, the browser uses the document body, and the button moves with page scrolling.

Тo position the FloatingActionButton relative to a specific area in absolute mode, place it inside that area and set a CSS position value, such as relative, on the area. The nearest positioned ancestor defines the containing block.

The following example lets you switch between fixed and absolute positioning while the page scrolls.

Example
View Source
Loading ...

Alignment

The FloatingActionButton allows you to set horizontal and vertical alignment with regard to the viewport, HTML element, or Angular Component. Use align to set the FloatingActionButton's horizontal and vertical position within the active positioning context.

The horizontal setting defines the possible horizontal alignment of the FloatingActionButton and provides the following options:

  • start—Uses the start point of the container.
  • center—Uses the center point of the container.
  • end (Default)—Uses the end point of the container.

The vertical setting defines the possible vertical alignment of the FloatingActionButton and provides the following options:

  • top—Uses the top point of the container.
  • middle—Uses the middle point of the container.
  • bottom (Default)—Uses the bottom point of the container.

Centering the FloatingActionButton in both dimensions is not a typical use case. Still, you can adjust a centered position with offsets. Setting horizontal: 'center' and vertical: 'middle' at the same time is not supported.

The following example displays the supported horizontal and vertical alignment points.

Example
View Source
Loading ...

Offset

The FloatingActionButton allows you to use offset to adjust the position set by align.

The available offset values are:

  • x—Sets the horizontal offset.
  • y—Sets the vertical offset.

For edge alignments, the default offset places the button 16 pixels from the container boundary. When an axis uses center or middle, its default offset places the button at 50% on that axis. Set a non-default value to move the button away from the center.

For corner alignments, positive offsets move the button inward from its edges. At bottom-center, positive x moves the button right, and positive y moves it up. Negative offsets reverse those directions and can move the button beyond the container boundary.

The following example lets you change the horizontal and vertical offsets in pixels.

Example
View Source
Loading ...
In this article
Position ModeAlignmentOffsetSuggested Links
Not finding the help you need?
Contact Support