--- title: FAB / Speed Dial desc: FAB (Floating Action Button) stays in the bottom corner of screen. It includes a focusable and accessible element with button role. Clicking or focusing it shows additional buttons (known as Speed Dial buttons) in a vertical arrangement or a flower shape (quarter circle). source: https://raw.githubusercontent.com/saadeghi/daisyui/refs/heads/master/packages/daisyui/src/components/fab.css layout: components classnames: component: - class: fab desc: Container element. It includes a focusable div like
A
and when it gets clicked of focused, it shows more floating buttons part: - class: fab-close desc: Optional class for a close button (or a wrapper of a close button) - class: fab-main-action desc: Optional class for the main action button (or a wrapper of the main action button). Either use fab-close or fab-main-action, not both modifier: - class: fab-flower desc: Modifier class for fab to make it open in a quarter circle arrangement instead of vertical --- ### ~FAB and Speed Dial (vertical) #### Click or focus the A button in the corner
F
```html
F
``` > :INFO: > > Why using `
` instead of a `
```html
``` ### ~FAB and Speed Dial with labels #### Text labels for each button
F
Label B
Label C
Label D
```html
F
Label B
Label C
Label D
``` ### ~FAB and Speed Dial with rectangle buttons #### You can remove the btn-circle class if you want normal buttons
F
```html
F
``` ### ~FAB and Speed Dial with labels and fab-close button #### When FAB is open the original button gets replaced by a Close Button
F
Close
Label A
Label B
Label C
```html
F
Close
Label A
Label B
Label C
``` ### ~FAB and Speed Dial with labels and fab-main-action Button #### When FAB is open the original button gets replaced by a Main Action Button
F
Main Action
Label A
Label B
Label C
```html
F
Main Action
Label A
Label B
Label C
``` ### ~A single FAB (Floating Action Button) #### If you only want one button in the corner of page
```html
``` ### ~FAB Flower and Speed Dial #### fab-flower modifier class will open the button in a quarter circle instead of a vertical. fab-flower can fit 1 to 4 buttons, not including the original button, the fab-close button or the fab-main-action button.
F
```html
F
``` ### ~FAB and Flower Speed Dial with SVG icons
```html
``` ### ~FAB and Flower Speed Dial with tooltip #### There's no space for a text label in a quarter circle, so tooltips are used to indicate the button's function
F
```html
F
```