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 motionclick
Open on the canvas to copy the code → Free account · 3 copies a day · membership goes unlimited
Worth keeping?
Votes steer what gets built next — sign in to cast one, free to read
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)
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
More UI Micro-interactions components
- Add to Cart FlyProduct tile flings a mini clone in a bezier arc into a cart icon on click; badge count bumps with a spring bounce. Auto-cycles as demo.
- 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 mockup with draggable list rows; pulling down reveals a teal arc spinner that fills and rotates, then triggers a skeleton-row flash on release.
- 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.