/community/skills/techboidesign skills/techboi motion
innernet
docsskillscommunitycompanydeveloperssecurityprivacytermscontact

a skill by Techboidesign, brought here by kt

techboi motion

paste this link into your ai. it will know what to do.

/skills/techboidesign-techboi-motion

Alejandro Alvarez's motion rules for websites — fast, snappy, minimal transitions, hovers, press feedback, scroll reveals, page transitions, menus and overlays, with hard duration caps, one-axis movement and full reduced-motion support. Use when adding or reviewing any animation, transition, hover, reveal, page transition or overlay in HTML/CSS.

kindskill
version1.0
last tended2026-12-03
written byTechboidesign
sourcegithub.com/Techboidesign/skill-pack
kept currentwith its source · last read 2026-12-03
in the foldertechboidesign skills · 2 of 5 · ‹ techboi design system builder · techboi web rules ›
brought here bykt
reuseMIT
yours?it stays under your name. to change it or take it down, write to connect@innernet.live
reading4 min

Techboi Motion

Motion is a quick confirmation, never a show. If nobody would miss it, delete it.

Recipes (copy-paste CSS/JS): [references/RECIPES.md](references/RECIPES.md). Reveal script: [scripts/reveal.js](scripts/reveal.js). Works with techboi-web-rules (tokens, layers, BEM) and is checked by techboi-web-validation and techboi-website-quality-audit.

1. Decide first

  1. 1Should it move at all? Seen many times a day (nav, filters, keyboard actions) → no movement, colour only. Keyboard-triggered actions never animate.
  2. 2What is it for? Feedback (hover, press), state change (open/closed), orientation (page change, overlay). "Looks cool" is not a reason.
  3. 3Fewest properties. Opacity first. Add a short move only if it explains where something came from.

2. Tokens (the only values allowed)

:root {
  --dur-fast: 120ms;  /* hover, press, every exit */
  --dur: 200ms;       /* menus, overlays, accordions */
  --dur-slow: 300ms;  /* cap for anything answering the user */
  --reveal-fade: 300ms; /* scroll reveals: play while the user reads */
  --reveal-rise: 400ms;
  --curve: ease;                              /* colour and opacity */
  --curve-out: cubic-bezier(0.23, 1, 0.32, 1); /* anything entering or moving */
  --stagger: 40ms;
  --rise: 48px;       /* reveal distance — house style, not a standard */
  --shift: 8px;       /* overlay distance */
}
/* Movement itself lives inside @media (prefers-reduced-motion: no-preference) */

Never hardcode a duration or curve. Never use ease-in (feels slow) or transition: all.

3. Caps — two tiers

⚡ Answering the user (hover, press, menus, overlays, page transitions): ≤ --dur-slow (300ms). 🌊 Playing while reading (scroll reveals, first view): --reveal-* tokens, first view ≤ 1s.

ThingDurationCurveMovement
Hover: colour, underline, weight--dur-fast--curvenone
Press (:active)--dur-fast--curve-outscale: 0.97
Image hover--dur--curve-outscale ≤ 1.03
Menu / overlay open--dur--curve-outopacity + --shift on ONE axis
Menu / overlay close--dur-fast--curve-outopacity (exit is always faster)
Accordion--dur--curve-outheight (interpolate-size)
Scroll reveal--reveal-fade / --reveal-rise--curve / --curve-outopacity + --rise up
First view (hero title, pixel fall)≤ 1s--curve-outopacity + short rise
Page transitionold --dur-fast / new --dur--curveopacity only; header stays
Loops (marquee)linearlinearneeds pause/stop (WCAG 2.2.2)
  • 🟡 The 300ms cap is industry guidance (Emil Kowalski), not a standard. It applies to the ⚡ tier only.
  • A row of reveals (with stagger) finishes within ~600ms.
  • Stagger ≤ 5 items × --stagger. Never block clicks while it plays.

4. Movement rules

  • One axis only. Vertical for reveals and drop-downs; horizontal only for a panel entering from a side edge. Never X and Y together, never diagonal, never rotate.
  • Distances are tokens: --rise (48px) for reveals, --shift (8px) for overlays. Panels from an edge may travel their own width.
  • Never from scale(0). Start at 0.95+ with opacity.
  • No bounce, overshoot, parallax or blur on large areas (blur is expensive, and WCAG counts it as motion).
  • Animate only opacity, transform, translate, scale. Colour changes are fine. Never width, height, top, margin (except the accordion height via interpolate-size).
  • Transitions over keyframes for anything the user can trigger repeatedly: they reverse mid-way, keyframes restart.
  • Popovers grow from their trigger (transform-origin at the trigger). Modals stay centred.

5. Page load and scroll

  • Above the fold is never hidden. It's visible at once — it may fade in, but never waits for a script. (Protects LCP.)
  • Below the fold reveals once, as it enters, never again on scroll-up. Rows arriving together stagger left to right.
  • No JavaScript = everything visible. The script only adds the hidden state.
  • Don't hijack scroll. If the wheel is smoothed, any key, pointer or touch stops it at once, and it's off with reduced motion.

6. Page transitions

  • Cross-document View Transitions only: @view-transition { navigation: auto; }. No SPA router, no JS.
  • Opacity crossfade, old out fast, new in slightly slower. Header (and anything shared) keeps its place.
  • Browsers without support just navigate — that is fine.

7. Hover and touch

  • Every hover lives in @media (hover: hover) and (pointer: fine) — nothing sticks after a tap.
  • Every clickable thing reacts, but with colour/weight/underline first; movement only on images and cards.

8. Reduced motion (always)

  • With prefers-reduced-motion: reduce: nothing moves, grows or slides. Every movement rule sits inside no-preference; page transitions and loops are off, video shows its poster.
  • Opacity and colour changes may stay (≤ --dur-fast); they help comprehension.
  • 🟢 [STANDARD] WCAG 2.2.2 Pause, Stop, Hide (Level A): content that moves on its own for more than 5s, next to other content, needs a pause/stop/hide control.
  • 🟢 [STANDARD] WCAG 2.3.3 Animation from Interactions (Level AAA): motion triggered by interaction can be turned off. Opacity and colour don't count as motion; blur does.

9. Check before shipping

  • techboi-web-validation → check.sh step 6 flags transition: all, ease-in, hardcoded durations and --dur* tokens over 300ms (--reveal-* are exempt; one-offs carry an allowed: comment).
  • techboi-website-quality-audit → WCAG 2.2.2 / 2.3.3, Lighthouse non-composited-animations, CLS (reveals use transform, so they never shift layout).
  • By eye: DevTools → Animations panel at 10% speed; then turn on Reduce motion and check that nothing moves.

keep it where your ai can reach it.

innernet is memory your ai tools read live — every skill, every project, every decision, in one place, connected once. save this skill to yours, or publish one of your own as a link like this.

save it to your innernetsee every skill