Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

animate

БесплатноБез исполняемых скриптовНе проверен

Add, change or fix an animation in JS, React or Vue, with CSS or Motion (motion, motion/react, motion-v, framer-motion): hover and tap effects, enter and…

motiondivisionот motiondivision★ 154 звезды на GitHub

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

Animation best practices

Choosing a tool

  • CSS or Motion: read this first when you add animation to a project.

Platform-specific rules

Universal rules (all platforms)

Performance

Properties

Prefer transforms (transform or independent transforms like x, y, scale, rotate), opacity, clipPath and filter where possible as these are hardware accelerated. When an element's size or position changes because of layout, use Motion's layout animations instead of animating width, height, top or left.

Execution speed

Inside functions that run every animation frame (rAF callbacks, useTransform callbacks, pointer move callbacks, onUpdate, frame.render etc):

  • Avoid object allocation. Prefer mutation where safe.
  • Prefer for loops over forEach of map, unless function callback can be pre-allocated.
  • Avoid Object.entries, Object.values.

Animating via transform vs independent transforms

Motion can animate transforms either via transform or x, y, scale etc.

animate(element, { transform: "scale(2)" })
animate(element, { scale: 2 })
<motion.div animate={{ transform: "scale(2)" }} />
<motion.div animate={{ scale: 2 }} />

Both are hardware accelerated on HTML elements. Prefer independent transforms when:

  • Some transforms have different transition settings
  • Some transforms need to be passed in as motion values
  • Defining transforms via style prop
  • You have competing/composable transforms:
animate(element, { x: 100 })

hover(() => {
    animate(element, { scale: 1.2 })
    return () => animate(element, { scale: 1 })
})
<motion.div animate={{ x: 100 }} whileHover={{ scale: 1.2 }} />

Accelerated animations are de-optimised to the main thread when they use onUpdate (prop or transition option), transformTemplate, type: "inertia", layout animations, on SVG elements, or when a transform motion value is set every frame (drag, useMotionValue streams). Don't change working code to avoid these, they still perform well.

will-change

When animating transforms, opacity, clipPath or filter, and it will de-opt according to rules above, set will-change on the animating properties so the browser promotes the element to its own compositor layer. Use it sparingly and remove it once the animation finishes.

When animating with CSS animation or a hardware-accelerated Motion animation (transform, x, scale etc), this is unnecessary — the layer is promoted automatically by the browser.

Design

In general, prefer physics-based springs for physical motion such as x, rotate etc. Especially when it could be interrupted.

Non-numerical values won't use spring physics so you can use more predictable settings like type: "spring", bounce: 0.2, visualDuration: 0.4

Consider the kind of interface you are building. If a serious website like stock trading, don't use overshoot in your springs or easing curves. If it's a wedding site, you can use softer curves and slightly longer durations.

Keep UI animations short: about 150 to 300 ms for small elements, and up to about 500 ms for large surfaces.

Each animation should show a change of state, a relationship between elements or feedback to an action. Do not add animation only for decoration.

Accessibility

Respect the reduced motion setting. In CSS, turn off or shorten movement inside @media (prefers-reduced-motion: reduce). For Motion for React, see "Reduced motion" in React.

Generated code

Do not add comments, links, credits or tracking to the user's code unless they ask for them.

API best practice

MotionValues

  • Never use motionValue.onChange(update) — always use motionValue.on("change", update)
Полный SKILL.md на GitHub

Установить animate в Claude Code и Claude Desktop

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

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

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

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

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

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

Вложенные файлы

base-ui.mdcss-or-motion.mdmotion.mdreact.mdvue.md

FAQ

Что делает скилл animate?

Add, change or fix an animation in JS, React or Vue, with CSS or Motion (motion, motion/react, motion-v, framer-motion): hover and tap effects, enter and exit, scroll, layout and shared-element transitions, drag, springs, stagger, reduced motion. Use whenever the user asks to animate something, add a transition, or make UI feel smoother or snappier, even if they don't name Motion.

Как установить скилл animate?

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

Скилл animate запускает скрипты?

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

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

Сравнить animate с