Joelclaw ui-animation
Guidelines and examples for UI motion and animation. Use when designing, implementing, or reviewing motion, easing, timing, reduced-motion behaviour, CSS transitions, keyframes, framer-motion, or spring animations.
install
source · Clone the upstream repo
git clone https://github.com/joelhooks/joelclaw
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/joelhooks/joelclaw "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/ui-animation" ~/.claude/skills/joelhooks-joelclaw-ui-animation && rm -rf "$T"
manifest:
skills/ui-animation/SKILL.mdsource content
UI Animation
Core rules
- Animate to clarify cause/effect or add deliberate delight.
- Keep interactions fast (200-300ms; up to 1s only for illustrative motion).
- Never animate keyboard interactions (arrow-key navigation, shortcut responses, tab/focus).
- Prefer CSS; use WAAPI or JS only when needed.
- Make animations interruptible and input-driven.
- Honor
(reduce or disable).prefers-reduced-motion
What to animate
- For movement and spatial change, animate only
andtransform
.opacity - For simple state feedback,
,color
, andbackground-color
transitions are acceptable.opacity - Never animate layout properties; never use
.transition: all - Avoid
animation for core interactions; if unavoidable, keep blur <= 20px.filter - SVG: apply transforms on a
wrapper with<g>
.transform-box: fill-box; transform-origin: center - Disable transitions during theme switches.
Spatial and sequencing
- Set
at the trigger point.transform-origin - For dialogs/menus, start around
; avoidscale(0.85-0.9)
.scale(0) - Stagger reveals <= 50ms.
Easing defaults
- Enter and transform-based hover:
.cubic-bezier(0.22, 1, 0.36, 1) - Move:
.cubic-bezier(0.25, 1, 0.5, 1) - Simple hover colour/background/opacity:
.200ms ease - Avoid
for UI (feels slow).ease-in
Accessibility
- If
is used, disable it intransform
.prefers-reduced-motion - Disable hover transitions on touch devices via
.@media (hover: hover) and (pointer: fine)
Performance
- Pause looping animations off-screen.
- Toggle
only during heavy motion and only forwill-change
/transform
.opacity - Prefer
over positional props in animation libraries.transform - Do not animate drag gestures using CSS variables.
Reference
- Snippets and practical tips: examples.md
Workflow
- Start with the core rules, then pick a reference snippet from examples.md.
- Keep motion functional; honor
.prefers-reduced-motion - When reviewing, cite file paths and line numbers and propose concrete fixes.