Command Palette

Search for a command to run...

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

better-motion

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

Decides what should animate and builds it, with exact values for duration, easing, scale and distance and recipes for enters, exits, icon swaps, shared layout…

jakubkrehelот jakubkrehel★ 13 161 звезда на GitHub

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

Motion

This skill decides whether an element should move and gives the values and recipes for when it should. It covers transitions, springs, enters and exits, icon swaps, shared layout animation, animated height and drag.

Less motion, exact values

The first question is whether to animate at all, and the answer is often no. Add motion where the request asks for it or a principle here calls for it. Removing an animation is a valid fix.

The values come in two kinds. The press scale, the icon cross-fade, the stagger and the spring bounce are exact, so 0.96 is not 0.95. The duration, scale and distance tables are starting points for desktop web. Adjust them by eye for the element's size and the distance it travels. Full-screen transitions on mobile run longer and travel farther.

Keep the project's motion library, tokens and curves, and match its motion language wherever no principle here gives a value. A deliberate and consistent project convention is a preference and not a finding. That covers a value too, so a project that presses to 0.95 on every button keeps it. The same detail done two ways within the project is a finding.

The reduced-motion requirement, pause controls and the single-pointer alternative to a drag belong to better-accessibility. Surfaces, icon weight and color and hover gating belong to better-ui. The layout an animation moves between belongs to better-layout.

How often it is seen decides whether it moves

Keystrokes, row hovers and the content behind a tab change instantly, or with a transition of 150ms or less on opacity or background-color. A tab's indicator may still travel between tabs. See transitions.md.

A menu people open many times a day skips its opening animation and animates only as it closes. A context menu and a command menu count, and a menu on a settings page does not. Reserve expressive motion for infrequent moments such as a view's first load, a success state or an empty state.

Every animated state change also leaves a static cue in the form of a color, icon or label. Motion is never the only feedback channel.

Transitions, not keyframes, for interactive state

Drive interactive state changes with CSS transitions or a motion library's springs, which retarget when the user reverses mid-flight. Keyframes run a fixed timeline and cannot reverse, so reserve them for sequences that run once. See transitions.md.

Duration follows size

Small elements move fast and large ones take longer:

Element Enter
Tooltips and other small elements 150ms
Dropdowns and menus 250ms
Modals, drawers and panels 350ms–450ms

An exit runs shorter than its enter, so a dropdown that opens in 250ms closes in 150ms.

Ease out, and spring what has weight

Enters, exits and state changes take ease-out. Loading indicators and other continuous loops take linear. A sheet opening, a shape morphing, a drag settling and a slider thumb take a spring, because they imitate a physical object.

A color or opacity change never takes a spring, since nobody can see the difference. CSS has no practical spring. Without a motion library, stand in with cubic-bezier(0.2, 0, 0, 1) at the same duration.

Springs take a duration and no bounce

Write a spring as { type: "spring", duration: 0.3, bounce: 0 }, and bounce is always 0. Use 0.3 for small swaps, 0.4 for a tab indicator and 0.45 for a drawer.

Where one surface shares a spring, set it once on MotionConfig and leave transition off the children. See transitions.md.

Scale shrinks as the element grows

A tooltip or dropdown enters from 0.96 or 0.97. A modal or panel enters from 0.98 or 0.99, because a large surface scaling from 0.95 changes too much of the screen. A modal or panel exits to 0.99, a smaller change than its enter.

Scale from the trigger

Set transform-origin toward the element that opened the popup, never the default center. Base UI and Radix publish that side as a CSS variable. A badge or indicator in a corner scales from that corner. A dialog centered on the screen keeps the center. See enter-exit.md.

Movement shows where it came from

Travel only far enough to show direction:

Movement Distance
A text swap 4px
A page transition 8px
Dropdowns, tooltips and most elements 8px–32px
Sheets and side panels Up to 70% of their own width or height

A dropdown moves away from its trigger, a panel enters from the side it was opened from and a tab indicator travels between the two tabs.

Press scales to 0.96

A pressed button scales to 0.96 over 150ms with ease-out, and a disabled one never scales. Give the button an opt-out where the motion would distract, through the component's existing variant API or a static prop

Полный SKILL.md на GitHub

Установить better-motion в Claude Code и Claude Desktop

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

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

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

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

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

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

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

agents/openai.yamldrag.mdenter-exit.mdicon-transitions.mdlayout-animation.mdperformance.mdreporting.mdslow-motion.mdtransitions.md

FAQ

Что делает скилл better-motion?

Decides what should animate and builds it, with exact values for duration, easing, scale and distance and recipes for enters, exits, icon swaps, shared layout animation and drag.

Как установить скилл better-motion?

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

Скилл better-motion запускает скрипты?

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

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

Сравнить better-motion с