OGE logoOGE

FAB & Speed Dial

oge-fab is the screen's one primary action, pinned to a viewport corner or edge with the safe-area insets as a floor; oge-speed-dial unfolds a short list of related actions from it, following the WAI-ARIA APG menu button pattern: the FAB is a aria-haspopup="menu" button, the actions are menu items, opening moves focus to the nearest one.

The demos pin their FABs inside a box (positionMode="absolute"); in an app the default fixed pins them to the viewport.

position safe areas APG menu button [(opened)]

Floating action button

An icon-only FAB takes its accessible name from label. Pass the icon as SVG path data, or project your own aria-hidden icon. clicked reports the press.

label icon clicked

Pressed 0 times

Extended FAB

extended shows the label as text beside the icon in a pill. Sizes are 40 / 56 / 72 px; severity uses the button vocabulary (normal is the page surface).

extended size severity

Positions & safe areas

Six logical positions — start/end mirror in RTL. Pinned edges use max(offset, env(safe-area-inset-*)), so a fixed FAB clears the home indicator and the notch once the app opts into viewport-fit=cover, and keeps the plain gap everywhere else.

position offset env(safe-area-inset-*)

Speed dial

Enter, Space, a click or the arrow pointing along the dial opens it with focus on the nearest action (the arrow back opens it on the last). The arrows move and wrap, Home/End jump, Escape closes and returns focus to the FAB, Tab closes and moves on, a press outside closes it.

items [(opened)] itemClick APG menu button

Last action: none · opened: false

Directions & label modes

direction overrides the default (up from a bottom FAB, down from a top one). labelMode is hover (beside the hovered or focused action, always on touch screens), always, or none — the label then stays the accessible name only. A disabled action is aria-disabled and skipped by the arrows.

direction labelMode disabled item

Hover mode

openMode="hover" also opens the dial while a mouse hovers it — never on touch, where a tap is the only gesture. Hover does not move focus; a click still opens it with focus on the first action.

openMode: hover