recipe-ui-microinteractions.md
attributes
| source_url | https://github.com/diffusionstudio/lottie/blob/3c72912fad543897f90045ed4d355813837927fc/skills/text-to-lottie/references/recipe-ui-microinteractions.md |
|---|
Recipe: UI Microinteractions
Use for button states, toggles, feedback ticks, hover/click affordances,
notifications, progress states, onboarding hints, empty-state feedback, and
compact product UI motion.
User-Language Aliases
- "button press", "hover animation", "toggle switch", "tap feedback"
- "toast notification", "progress bar", "confirmation feedback"
- "empty state motion", "form success", "small UI interaction"
Defaults
- Short, responsive motion.
- Preserve the user's UI style if source context exists.
- Use subtle distances and clear state changes.
- Make the state change the climax. Everything before it is setup; everything
after it is confirmation. - Believability comes from coherent state, not dense UI detail.
- Transparent background unless demonstrating a full component card.
Presets
soft-confirm: success tick or status icon draws and settles.toggle-shift: knob slides with color/opacity state change.button-press: scale/brightness press and quick release.notification-pop: small card/icon enters, holds, exits.progress-fill: determinate bar/ring fill with readable easing.empty-nudge: small illustration or icon prompts action without noise.
Timing And Easing
- Press/hover feedback: 8-18 frames.
- Toggle/progress/state transition: 18-45 frames.
- Notification enter/exit: 30-75 frames.
- Use low-distance ease-out. Avoid large overshoot in functional UI.
Ask Only When Needed
- Ask for the UI state pair if not clear.
- Ask whether the animation is one-shot, reversible, or looped if ambiguous.
- Ask for exact label/copy only when text appears in the animation.
Construction Notes
- Keep state transitions reversible when practical.
- Use consistent timing across related states.
- When one value drives multiple properties, keep them synchronized: handle
position, fill amount, color, label, and dash style should agree. - Expose slots for accent color, label text, and progress value when useful.
- Avoid large brand-intro motion in functional UI contexts.
Common Failure Modes
- Animation feels slow after a user action.
- Motion is too large for the component's size.
- State change is unclear without reading surrounding UI.
- Active state, label, and geometry disagree.
- Final state does not align to the component geometry.
Acceptance Checks
- Motion communicates the state change immediately.
- UI state is coherent and readable without extra surrounding context.
- No element jumps, clips, or overshoots awkwardly.
- The animation still reads when viewed small.
- Timing feels responsive at 60 fps.
Copyright (c) 2026 Diffusion Studio Inc. License files are attached. MIT
MIT notice
Copyright (c) 2026 Diffusion Studio Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Children
No children yet.
Like how this is organised?
Build your own Memory tree on knowen.md: notes, decisions and tasks in one connected markdown graph, shared with your team and your AI agents.