Command Palette

Search for a command to run...

Назад к скиллам
скилл № 71284

animation-principles

Applies Disney's 12 animation principles to UI motion design. Use when improving animation quality, designing micro-interactions, creating easing curves, or…

БесплатноБез исполняемых скриптов
dylantarreот dylantarre★ 56 звёзд на GitHub6 установок в других каталогах

Установить animation-principles в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Animation Principles for UI

Overview

Apply Disney's 12 principles of animation to create UI motion that feels natural, purposeful, and delightful. These principles, developed in the 1930s for character animation, translate directly to modern interface design.

When to Use

  • Designing micro-interactions and transitions
  • Making animations feel more natural and polished
  • Reviewing animation quality in a design system
  • Training team members on motion design fundamentals
  • Creating animation guidelines for a design system

Quick Reference: The 12 Principles

Principle UI Application Priority
Easing (Slow in/out) All transitions Essential
Anticipation Button press, drag start High
Follow-through Modals, dropdowns, toasts High
Secondary Action Loading states, notifications Medium
Timing Duration based on distance/importance Essential
Squash & Stretch Buttons, toggles, playful UI Medium
Staging Focus attention, reduce distraction High
Arc Natural movement paths Medium
Exaggeration Emphasis, delight moments Low
Solid Drawing Consistent 3D perspective Low
Appeal Brand personality Medium
Straight Ahead / Pose to Pose Complex sequences Low

1. Easing (Slow In and Slow Out)

Principle: Objects don't start or stop instantly - they accelerate and decelerate.

In UI: Never use linear timing for UI animations. Use easing curves.

CSS Implementation

:root {
  /* Standard easing - use for most transitions */
  --ease-out: cubic-bezier(0.0, 0.0, 0.2, 1);      /* Decelerate */
  --ease-in: cubic-bezier(0.4, 0.0, 1, 1);         /* Accelerate */
  --ease-in-out: cubic-bezier(0.4, 0.0, 0.2, 1);   /* Both */

  /* Expressive easing - more personality */
  --ease-expressive: cubic-bezier(0.4, 0.14, 0.3, 1);

  /* Spring-like - for playful UI */
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-overshoot: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ❌ Bad - robotic, unnatural */
.modal {
  transition: opacity 200ms linear;
}

/* ✅ Good - natural deceleration */
.modal {
  transition: opacity 200ms var(--ease-out);
}

When to Use Each

Easing Use Case
ease-out Elements entering (modals, dropdowns, toasts)
ease-in Elements exiting, leaving viewport
ease-in-out Elements that stay on screen (position changes, morphing)
bounce/overshoot Playful interactions, success states, toggle switches

2. Anticipation

Principle: Prepare the audience for an action before it happens.

In UI: Give users a hint that something is about to happen.

Examples

/* Button press - slight scale down before action */
.button:active {
  transform: scale(0.97);
  transition: transform 50ms var(--ease-in);
}

.button:not(:active) {
  transition: transform 150ms var(--ease-out);
}

/* Drag anticipation - lift before moving */
.draggable.is-lifting {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
  transition: all 100ms var(--ease-out);
}

/* Pull-to-refresh - resistance before release */
.pull-indicator {
  transform: translateY(calc(var(--pull-distance) * 0.4));
  /* Rubber band effect - moves slower than finger */
}

Swipe Action Anticipation

/* Card swipe - tilt in direction of swipe */
.card.swiping-right {
  transform: translateX(var(--swipe-x)) rotate(calc(var(--swipe-x) * 0.05deg));
}

3. Follow-Through and Overlapping Action

Principle: Different parts of an object move at different rates; motion continues after the main action stops.

In UI: Elements don't stop all at once. Parts settle at different times.

Modal with Follow-Through

/* Backdrop and content animate separately */
.modal-backdrop {
  animation: fadeIn 200ms var(--ease-out);
}

.modal-content {
  animation: slideUp 300ms var(--ease-out);
  animation-delay: 50ms; /* Slightly after backdrop */
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

Staggered List Items

/* Items enter one after another */
.list-item {
  animation: fadeSlideIn 300ms var(--ease-out) both;
}

.list-item:nth-child(1) { animation-delay: 0ms; }
.list-item:nth-child(2) { animation-delay: 50ms; }
.list-item:nth-child(3) { animation-delay: 100ms; }
.list-item:nth-child(4) { animation-delay: 150ms; }

/* Or dynamically with CSS custom properties */
.list-item {
  animation-delay: calc(var(--index) * 50ms);
}

React Implementation

// Staggered children
function StaggeredList({ children }) {
  return (
    <div>
      {React.Children.map(children, (child, index) => (
        <div
          style={{ '--index': index } as React.CSSProperties}
          className="stagger-item"
        >
          {child}
        </div>
      ))}
    </div>
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл animation-principles?

Applies Disney's 12 animation principles to UI motion design. Use when improving animation quality, designing micro-interactions, creating easing curves, or making transitions feel natural and purposeful.

Как установить скилл animation-principles?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл animation-principles запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить animation-principles с