Skip to content
Design
Skill

/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.

From plugin
interfaces
13k16 skills

Claude Code

$ npx -y skills add jakubkrehel/skills --skill better-motion --agent claude-code

SKILL.md

better-motion.SKILL.md
name: better-motion
description: 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.

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](transitions.md#high-frequency-motion).

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](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](transitions.md#one-transition-for-the-surface).

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](enter-exit.md#origin-from-the-trigger).

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. See [recipes for CSS, Tailwind and Motion](transitions.md#scale-on-press).

Stagger infrequent entrances by 100ms

Where sequence communicates hierarchy in a staged entrance, split the content into semantic chunks such as title, description and actions. Stagger them `100ms` apart, each entering with opacity, `4px` of blur and `12px` of `translateY` over `300ms` with `ease-out`. Never stagger routine interactions. See [enter-exit.md](enter-exit.md).

Exits are shorter and smaller than enters

Exit with opacity, `4px` of blur and a fixed `-12px` `translateY` over `150ms` with `ease-out`, never the full container height. Slide fully out only where the destination carries meaning, such as a drawer closing. Remove the element instantly where motion adds no informati

Read more
@jakubkrehel
Ships withinterfaces

A collection of agent skills that help you build great interfaces.

Stars on GitHub

Momentum

stars in total
12.6k
Star history of jakubkrehel/skills on GitHub, a chart by star-history.com

Other skills on interfaces.

afk

afk

Works through a project while you're away, finding improvements and new ideas, building the best of them on a local branch and…

better-colors

better-colors

Builds and checks color systems by generating palettes, naming semantic tokens, converting between formats and measuring contrast.

better-interface

better-interface

Reviews a screen, flow or whole interface across accessibility, layout, writing, typography, color, UI polish and motion, and…

better-layout

better-layout

Sets grouping, alignment, reading order, responsive structure and room for translated text, so a layout holds up when it is…

More skills from other plugins.

impeccable

impeccable

Use to design, redesign, critique, audit, polish or animate a frontend: websites, landing pages, dashboards, app UI, components,…

@pbakaus@pbakausInstall Skill

Questions about better-motion.

Which coding agents can use better-motion?
better-motion installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.