Skip to content

SpeedDial

A floating main button that expands a list of sub-actions, commonly used for quick actions like "New/Share"; aria-expanded stays in sync, clicking outside / Esc collapses it, with no orphan popups.

The demos add style="position: static" to avoid fixed positioning affecting the page layout; in real use it is fixed to the bottom-right by default. The expansion direction of the sub-actions is controlled by direction.

Expansion direction

direction supports up (default) / down / left / right; the first sub-action is always closest to the main button.

Directions: up / down / left / right

Text-only actions

icon can be omitted to show only the label; icon-only actions (no label) are also supported.

Text only / icon only

Events

Clicking the main button to expand/collapse fires oas-open (detail: { open }); clicking a sub-action fires oas-select (detail: { index, label }) and collapses automatically.

Event feedback

Controlled open

The open attribute is controlled: setting/removing it externally expands/collapses, and the component's own clicks also sync the attribute and fire oas-open (clicking outside / Esc still collapses).

Controlled expansion

ExpandCollapseopen: false

API

Attributes

AttributeDescriptionTypeDefault
actionsSub-action JSONstring[]
directionExpansion directionstringup
openExpanded state (controlled)boolean

Events

EventDescription
oas-openExpanded/collapsed, detail: { open }
oas-selectA sub-action was selected, detail: { index, label }, then it collapses automatically

SpeedDialAction fields:

FieldDescriptionType
labelAction textstring
iconIcon name (a key of @oas-isui/icons iconRegistry)string

Behavior: clicking the main button toggles expansion (aria-expanded synced); clicking outside or pressing Esc collapses (after Esc, focus returns to the main button); when expanded, the first sub-action is focused automatically. The default position is position: fixed; bottom/right, overridable. The document-level listener is only attached while expanded and disconnected during cleanup — no orphan popups.