CommunityImagegithub.com

Adamparishspok/skills

Give an interface one shared tempo and a small vocabulary of hover and state micro-interactions: duration tiers (tap/pop/hover/card/layout) for CSS and Motion, swap hand-offs, rows whose highlight grows in, trailing arrows, chevron nudges, card lifts without translate, scroll-edge fades, and icon/label swaps for copy and toggle buttons. Use when animations feel inconsistent, durations are scattered magic numbers, hovers only change colour, or a product feels flat or unfinished. Triggers on: animation duration, transition timing, hover state, micro-interaction, polish, copy button feedback, menu icon to close, back arrow, card hover, scroll fade, motion tokens, Framer Motion durations.

What is skills?

skills is a Cursor agent skill that give an interface one shared tempo and a small vocabulary of hover and state micro-interactions: duration tiers (tap/pop/hover/card/layout) for CSS and Motion, swap hand-offs, rows whose highlight grows in, trailing arrows, chevron nudges, card lifts without translate, scroll-edge fades, and icon/label swaps for copy and toggle buttons. Use when animations feel inconsistent, durations are scattered magic numbers, hovers only change colour, or a product feels flat or unfinished. Triggers on: animation duration, transition timing, hover state, micro-interaction, polish, copy button feedback, menu icon to close, back arrow, card hover, scroll fade, motion tokens, Framer Motion durations.

Works with~Claude Code~Codex CLI✓Cursor
npx skills add https://github.com/Adamparishspok/skills/tree/HEAD/skills/motion-and-hover-polish

Installed? Explore more Image skills: steipete/songsee, affaan-m/frontend-design, mattpocock/improve-codebase-architecture · View all 6 →

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation


name: motion-and-hover-polish description: Give an interface one shared tempo and a small vocabulary of hover and state micro-interactions: duration tiers (tap/pop/hover/card/layout) for CSS and Motion, swap hand-offs, rows whose highlight grows in, trailing arrows, chevron nudges, card lifts without translate, scroll-edge fades, and icon/label swaps for copy and toggle buttons. Use when animations feel inconsistent, durations are scattered magic numbers, hovers only change colour, or a product feels flat or unfinished. Triggers on: animation duration, transition timing, hover state, micro-interaction, polish, copy button feedback, menu icon to close, back arrow, card hover, scroll fade, motion tokens, Framer Motion durations. license: MIT

Motion tiers and hover recipes

Two ideas, proven across 17 prototype apps:

  1. Durations are a scale, not a number per component. The eye reads a shared tempo as one product. Smaller things move faster.
  2. Hovers move geometry, gently. A highlight that grows into the row, an arrow that arrives, a chevron that leans toward where it goes, a label that rolls to its next state. Colour-only hovers read as a switch flipping.

Files

  • references/recipes.css: Tailwind v4 @theme tokens and @utility recipes.
  • references/timing.ts: the same tiers for Motion and WAAPI.
  • references/swap.tsx: IconSwap and LabelSwap (React).

Tiers

TiermsFor
tap100an icon swapping, a press
pop150a menu, popover or tooltip opening
hover200a row or control answering the pointer
card300a card lifting, a list settling, a page swap
layout500a panel collapsing, the page reflowing
  • Entrances ease out (cubic-bezier(0.22,1,0.36,1)). Exits ease in and run one tier shorter.
  • When two things trade places, the outgoing one leaves at once and the incoming one starts delay-handoff (50ms) later.
  • Value tweens (a counter, a bar filling, a chart line drawing) may run longer: the eye is following the data.
  • Keep deliberate springs.

Migration: map every ad-hoc duration to the nearest tier.

Ad-hoc valueTier
0.12tap
0.15–0.18pop
0.2–0.24hover
0.28–0.35card
0.4–0.5layout

Expect on-screen timing to change by under 20ms almost everywhere.

Recipes (one per element)

  • hover-grow (navigation rows, link rows):
    • The highlight is a ::before that starts inset (3px by 6px) and transparent, then swells to the full row as it fades in.
    • It also shows for :focus-visible, data-state=open and aria-current=page.
    • Square or brutalist designs (Carbon-like) should keep a flat highlight instead.
  • trail (link rows, "Browse plans"):
    • A trailing glyph at half scale and transparent until the parent .group is hovered or focused, growing from its leading edge.
    • trail-out (grows from the bottom-left) plus arrow-up-right marks links that leave the app.
  • nudge / nudge-back (chevrons, "View all", back links): a 2px lean toward the destination.
  • lift (clickable cards):
    • One surface step lighter and one shadow step deeper, over the card tier.
    • Never translate: a card that jumps under the cursor moves the thing being aimed at.
  • scroll-fade (scrolling panes):
    • Mask-based edge fades, only on a side that can still scroll. It is driven by the container's own scroll timeline and needs no ground colour.
    • Unsupported browsers simply show no fade.
  • IconSwap (menu to close, copy to check, sun to moon):
    • The outgoing glyph shrinks, tilts −22° and fades on an ease-in.
    • The incoming one follows after the hand-off delay.
    • Both stay mounted, so it reverses cleanly mid-flight.
  • LabelSwap ("Copy link" to "Copied", "Collapse" to "Expand"):
    • Both labels sit in one grid cell, so there's no width jump.
    • The hidden label goes invisible via transition-discrete, so assistive tech hears only the current one.

Traps

  • scroll-fade on an element that animates itself (Radix menu, popover or select content) replaces that element's exit animation. Radix waits for an exit that never ends, and the menu stays open. Put the fade on a scrolling child inside.
  • scroll-fade masks borders and shadows too. Don't put it on a bordered card; put it on the inner scroller.
  • Custom duration-* utilities in Tailwind v4 must also set --tw-duration, or a transition-[…] utility on the same element wins depending on sort order.
  • Named type steps that carry a line-height (--text-meta--line-height) shift every converted line by a pixel when replacing arbitrary sizes that inherited the parent's leading. Give in-between steps no line-height of their own.
  • Gate hovers behind @media (hover: hover). Show the same state on :focus-visible, and respect prefers-reduced-motion (Motion: <MotionConfig reducedMotion="user">).

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

Adamparishspok/skills

Make a website, web app or online store ready for AI agents. Scan it with Cloudflare's Agent Readiness checks, decide which checks apply to this kind of site, ship the discovery files and headers in priority order, and add the AI-first basics the scanner does not score (server-rendered content, JSON-LD, llms.txt). Covers robots.txt AI rules, Content Signals, sitemap, Markdown for Agents (Accept text/markdown), Link headers, API catalog, OAuth discovery, auth.md, MCP server card, A2A agent card, agent skills index, WebMCP, and commerce protocols (ACP, UCP, AP2, MPP, x402). Use when making a site AI-ready, agent-ready or AI-first, or fixing an isitagentready.com or Cloudflare Agent Readiness report. Triggers on: AI ready, agent ready, AI-first, agent readiness, isitagentready, AI Crawl Control, Markdown for Agents, text/markdown, llms.txt, GPTBot, ClaudeBot, AI crawlers, Content-Signal, ai-train, api-catalog, .well-known, oauth-protected-resource, auth.md, MCP server card, agent card, agent skills, WebMCP, a...

Adamparishspok/skills

Install a complete, lean favicon set on any website or web app — the five files modern browsers, iOS and Android actually use, one block of head markup added once in the root layout, and a check that every file resolves. Covers finding the public folder per framework, generating the set from one SVG (or from a RealFaviconGenerator package), dark-mode SVG icons, maskable manifest icons, cache busting and verification. Use when adding, replacing or auditing a favicon, app icon, apple-touch-icon or web manifest. Triggers on: favicon, favicon.ico, favicon.svg, apple-touch-icon, site.webmanifest, manifest.json, app icon, PWA icon, maskable icon, tab icon, RealFaviconGenerator.

Adamparishspok/skills

Consolidate several apps or prototypes onto one shared component library without flattening their looks. Covers finding duplicated local components (buttons, selects, fields, modals, pagers, toasts), making shared components token-sized so each suite or app sets its own measurements, mapping variant names, deciding what stays app-specific, and the tailwind-merge traps that silently break custom tokens. Use when several apps each grew their own Btn/Select/Modal, when a design system's components "don't fit" a second product, or when retheming a family of apps. Triggers on: shared component library, design system consolidation, duplicate components, retheme, suite of apps, shadcn retokened, token-driven components, cn tailwind-merge custom tokens, variant mapping.

Adamparishspok/skills

Build or migrate a UI's neutral palette (grounds, surfaces, lines, ink/text) as an OKLCH formula driven by a few inputs instead of dozens of hand-picked hex values, with light and dark themes, per-step ladder overrides, a fit script that reproduces existing colours, and a browser contrast audit. Use when creating a theme, adding dark mode, retinting a product, auditing text contrast, or consolidating several apps' palettes. Triggers on: palette, neutrals, grey ramp, dark mode, theme tokens, oklch, retint, hue, contrast audit, design tokens, Tailwind @theme colours.

Related Skills