UI Micro-interactions
Radio Dot Bloom
Radio list where selecting dips the ring, blooms a spring dot with overshoot, and fires an outward pulse. Auto-cycles through 5 options.
svgmedium complexitymoderate motionclickmobile-ready
Open on the canvas to copy the code → Free account · 3 copies a day · membership goes unlimited
1
When to use it
Settings panels, preference forms, or any single-select list where tactile selection feedback matters.
When not to
Long option lists (5+ items may feel crowded). Remove auto-cycle before shipping in production forms. Autonomous preview ends at first deliberate input and never resumes.
Working with an AI agent
Every component ships agent-ready metadata. An example instruction for this one:
Change accent color from '#2DD4BF' to '#A855F7', slow the bloom spring to 0.9s (change 0.62 in spring calc), and add a sixth label 'Resonance' to the labels array. 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
- accent color (ACC='#2DD4BF')
- dim ring color (DIM='#33585A')
- option labels (labels array)
- spring duration (0.62 divisor)
- auto-cycle interval (1700ms) Autonomous preview ends at first deliberate input and never resumes.
- dot bloom max radius (6.4)
- theme tokens (:root dark defaults + [data-theme=light] overrides)
Keep intact
- IIFE wrapper
- prefers-reduced-motion guard with static fallback
- visibilitychange stop/start
- spring() overshoot function
- 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
Known limitations
- Auto-cycles by default — remove auto+=dt block before use in real forms
- Background hardcoded to dark teal (#102A2E)
- Rows lack role=radio and aria attributes
- State remains local to each mounted instance; format/theme remount preserves takeover, not component values.
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.