∞ forever components

UI Micro-interactions

FAB Speed Dial

Pink FAB rotates plus-to-X and fans three labeled mini action buttons on a springy arc with overshoot; auto-cycles open/close as a demo.

cssmedium complexitymoderate motionclickmobile-ready

Open on the canvas to copy the code → Free account · 3 copies a day · membership goes unlimited

Live demo — the real component, running in a sandbox. One self-contained HTML file, zero dependencies. Open it on the canvas →
1

When to use it

Mobile-style UIs needing a contextual action menu, creative portfolios, or any layout where a compact floating action button should reveal multiple options.

When not to

Contexts requiring immediate access to actions — auto-cycles by default; remove the phase-transition timer before shipping in production. Avoid on extremely small viewports under 160px.

Working with an AI agent

Every component ships agent-ready metadata. An example instruction for this one:

Change the three labels to ['Share', 'Edit', 'Delete'], update icons to match, and slow the open animation by setting T.open to 0.9. Theme: dark tokens live in :root, the light variant in :root[data-theme="light"]; ?theme=light or a {type:'forever:theme'} postMessage switches at runtime.

Safe to edit

  • FAB color (#FB7185)
  • action labels (labels array)
  • arc angles (ang array)
  • spring timing (T.open / T.close / T.hold)
  • mini button count and icons (icons array)
  • theme tokens (:root dark defaults + [data-theme=light] overrides)

Keep intact

  • IIFE wrapper
  • prefers-reduced-motion guard (reduce branch)
  • visibilitychange pause/start
  • springPos overshoot easing
  • theme hook (?theme= bootstrap + forever:theme message listener + theme tokens)
  • demo-v1 preview lifecycle: initialize demoEnabled from window.__foreverPreview and stop attract work on the window forever:interactive event; retain manual feedback, settling, cleanup and explicit sessions
  • Native button semantics, Enter/Space toggle and immediate reduced-motion open/closed states; third action fans left to remain inside small frames.

Known limitations

  • Auto-cycles open/close — remove phase-transition block in step() for production use
  • Mini buttons lack aria roles; add role=button + aria-label for accessibility
  • Light re-theme via the [data-theme=light] token block; catalog bg/accent describe the dark default
  • State remains local to each mounted instance; format/theme remount preserves takeover, not component values.

fabspeed-dialspringui-controlmicrointeractionclickmaterial

More UI Micro-interactions components

  • Add to Cart FlyNative Add button flings a product clone into a cart; first input cancels unfinished attract flights, while each manual action keeps its full 680ms flight…
  • Notification BellSVG bell swings and rings with a ripple wave on click; a red badge counter pops in with a springy bounce and increments each ring. Auto-cycles every 2…
  • Copy ConfirmCopy icon morphs to a drawn-stroke checkmark with a green button flash and a "Copied!" toast on click; auto-cycles as a demo loop.
  • Swipe Card StackTinder-style draggable card stack — drag the top card left/right to reveal NOPE/LIKE stamps; fling-away animates it off-screen and cycles to the next card.
  • Pull to RefreshA phone-frame list supports pointer/touch pull and a native Refresh button. First input stops attract refreshes; manual refresh completes its spinner, row…
  • Accordion ExpandThree FAQ panels smoothly expand and collapse with a CSS height transition; a chevron rotates 180 degrees to indicate open state. Auto-cycles as demo.