agentleFS
soilmasssoilmass/motion-design-agent/skills/component-animations/SKILL.md

component-animations

Skill7 starsChanged 10 months agoMITView on GitHub

Complete animation specifications for UI component states. Use when implementing button, card, modal, toast, input, checkbox, switch, dropdown, or accordion animations with proper Disney principles and accessibility.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Elegant: No squash, subtle scale (0.98)

    line 28
  2. Distinctive:

    All components must provide reduced motion alternatives:

    line 133

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Component Animations

Complete animation specifications for every UI component state. Reference this skill when implementing component-level animations with proper Disney principles, brand variations, and accessibility.

Component Catalog

Button

Interaction States:

  • Idle -> Hover -> Press -> Release -> Idle
  • Idle -> Focus -> Press -> Release -> Blur -> Idle
  • Any -> Disabled
  • Any -> Loading
StateTransformDurationEasing
HovertranslateY(-2px)short-3standard-decelerate
Pressscale(0.95)short-2emphasized-decelerate
FocusFocus ring pulse1.5sease-in-out
LoadingSpinner rotation0.8slinear

Brand Variations:

  • Elegant: No squash, subtle scale (0.98)
  • Playful: Bounce with overshoot, scale 0.92 -> 1.05
  • Bold: Quick snap, scale 0.95 -> 1.02

Card

Interaction States:

  • Idle -> Hover -> Press -> Idle
  • Idle -> Selected
  • Idle -> Dragging -> Drop
StateTransformDurationEasing
HovertranslateY(-4px) + shadowshort-3standard-decelerate
Pressscale(0.98)short-2emphasized-decelerate
Entrancefade + slidemedium-1emphasized-decelerate
Draggingscale(1.02) rotate(2deg) + shadow--

Modal

States:

  • Closed -> Opening -> Open -> Closing -> Closed
StatePropertiesDurationEasing
Backdrop Openopacity + blurmedium-1standard
Content Openopacity + scale + translateYmedium-1emphasized-decelerate
Content Closeopacity + scaleshort-4emphasized-accelerate

Toast / Notification

States:

  • Hidden -> Entering -> Visible -> Exiting -> Hidden
VariantAnimationDurationEasing
Successslide + bounce + checkmark draw300msspring-bouncy
Errorslide + shake250ms + 150msemphasized-decelerate
Infoslide250msemphasized-decelerate

Input / Form Field

States:

  • Idle -> Focus -> Filled -> Blur
  • Any -> Error
  • Any -> Success
StateAnimationDurationEasing
Label FloattranslateY + scale(0.85)short-3standard-decelerate
Focus Ringborder + shadowshort-3standard-decelerate
Errorshake + border color150msease-out

Checkbox

States:

  • Unchecked -> Checked -> Unchecked
AnimationPropertyDurationEasing
Check Drawstroke-dashoffsetshort-3emphasized-decelerate
Box Fillbackground-colorshort-3standard
Playful Bouncescale 1.15short-4spring

Switch / Toggle

States:

  • Off -> On -> Off
AnimationPropertyDurationEasing
Knob SlidetranslateXshort-4spring-bouncy
Track Colorbackground-colorshort-3standard
Playful Squashwidth stretchshort-2standard

Dropdown / Select

States:

  • Closed -> Opening -> Open -> Closing -> Closed
AnimationPropertyDurationEasing
Menu OpenscaleY + opacityshort-4emphasized-decelerate
Item Staggeropacity + translateY150msstagger 25ms

Accordion

States:

  • Collapsed -> Expanding -> Expanded -> Collapsing -> Collapsed
AnimationPropertyDurationEasing
Content Heightgrid-template-rowsmedium-1emphasized-decelerate
Content Fadeopacityshort-3standard
Icon Rotatetransform rotate(180deg)short-3standard

List Items

AnimationPropertyDurationEasing
Entrance Staggeropacity + translateY250msstagger 50ms
Swipe DismisstranslateX + opacity + rotate200msemphasized-accelerate

Accessibility Variants

All components must provide reduced motion alternatives:

@media (prefers-reduced-motion: reduce) {
  /* Disable all transform animations */
  .button, .card, .modal, .toast, .dropdown-menu {
    transition: opacity 100ms ease !important;
    transform: none !important;
    animation: none !important;
  }

  /* Keep essential state indicators */
  .button:hover, .card:hover {
    opacity: 0.9;
  }

  .button:focus-visible, .input:focus {
    box-shadow: 0 0 0 3px var(--color-primary-alpha);
  }

  /* Instant state changes */
  .checkbox:checked + .checkbox__box .checkbox__check {
    stroke-dashoffset: 0;
    transition: none;
  }
}

Quick Reference Table

ComponentEnterExitHoverPress
Button--translateY(-2px)scale(0.95)
Cardfade+slidefadetranslateY(-4px)scale(0.98)
Modalscale+fadescale+fade--
Toastslide+bounceslide+fade--
Input----
Checkboxdrawfade--
Switchspringspring--
DropdownscaleYscaleY--
Accordionheightheight--
List Itemstaggerslidebackground-

Related Skills

  • animation-recipes - Pre-built recipes for component animations
  • accessibility - WCAG compliance for interactive components
  • easing - Curve selection for component states
  • entrance-patterns - Entrance animations for components
  • exit-patterns - Exit animations for components

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.