The Floating Action Button (FAB) is the primary action button on a screen that is displayed in front of all screen content. The FAB can perform an action or open a stack of two to five related actions (speed dial).
This demo illustrates a FAB that opens a speed dial when there are selected grid rows or performs a custom action—adds a new row—when nothing is selected.
In DevExtreme, the FAB is implemented as a container that collects and stores SpeedDialAction components. To display a FAB that performs a custom action, add a SpeedDialAction to the page. Specify its onClick and icon properties. Setting other properties is not required.
FAB parameters are configured in the floatingActionButtonConfig object. Use it to change the FAB's position, maximum number of actions, icons in the open and close states, and other parameters. In this demo, the drop-down menu under the grid allows you to select the direction in which the speed dial should be opened. The repaintFloatingActionButton() method is called to apply the new configuration.