Magoo Component UI logo Magoo Component UI
← Catalog

Floating Action Button

floating-action-button atom experimental

A circular floating primary-action button, optionally expanding into a speed-dial of secondary actions.

The width preview needs a screen wider than the chosen width — use a larger device (or a desktop browser) to see the desktop and tablet layouts.

Default
SpeedDial

Props

NameTypeReq
label string ✓
icon html
actions array
start_open boolean

Related components

How to use

The FAB is self-contained skeleton UI. With actions present, pressing it toggles the speed-dial by flipping data-open on the anchor (which drives the CSS reveal and the icon rotation) and updates aria-expanded; each action button dispatches a bubbling CustomEvent "fab:action" with { label } and closes the dial. With no actions, pressing the FAB dispatches fab:action with its own label. The portable self-init reads the DOM only; no props object is passed.

Use cases

actionbutton WCAG AA SEO 15 dir: both ai-generated