FAB / Speed Dial

Floating action buttons and vertical Speed Dials composed with Button

FAB / Speed Dial

A floating action button highlights a primary action. FAB owns placement, geometry, and action-group layout; Button owns color, focus, disabled, loading, and interaction styling.

When importing components individually, include both styles:

@import "@duskmoon-dev/core/components/button";
@import "@duskmoon-dev/core/components/fab";

Single and extended FABs

Use .fab-contained inside a positioned layout. Omit it for the default fixed bottom-end placement.

Contained FABs

.fab-start moves either placement mode to the logical inline start. Customize placement with --fab-offset-block and --fab-offset-inline; safe-area insets are added automatically. .fab-extended provides the icon-and-label geometry without copying Button colors.

Native Popover Speed Dial

Popover state is the only open-state authority in this mode. Light dismissal and Escape behavior are browser-managed, and closed actions are removed from interaction by the browser.

Native Speed Dial

New message
Upload file

Keep the trigger first in DOM order; CSS places the action group above it visually. Labels may wrap on narrow viewports. Use native buttons for actions and links for navigation.

Application-controlled Speed Dial

Use .fab-controlled with .fab-open only when the application owns the interaction. The application must synchronize aria-expanded, implement outside/Escape dismissal, and restore focus. Do not add [popover] to the controlled action group.

Controlled Speed Dial

Add event
Add task

API

Class or variable Purpose
.fab Fixed bottom-end placement container
.fab-contained Absolute placement within a positioned ancestor
.fab-start Logical bottom-start placement
.fab-extended Extended icon-and-label button geometry
.fab-speed-dial Vertical Speed Dial composition
.fab-trigger Speed Dial trigger part
.fab-actions Native Popover or controlled action group
.fab-action One action and its optional label
.fab-label Visible label for an icon-only action
.fab-controlled, .fab-open Application-controlled state contract
--fab-offset-block Logical viewport/container edge offset
--fab-offset-inline Logical inline edge offset
--fab-gap Spacing between actions

Motion is disabled when prefers-reduced-motion: reduce is active. All actionable children still need native semantics and accessible names.

FAB is not Circle Menu

Speed Dial is a vertical action group designed for predictable visual and keyboard order. Circle Menu is the existing radial navigation pattern; neither component replaces the other.