Frontend ToolsA little help for every day

Search by name or task, such as JSON or percentage.

Frontend Tools

CSS Transition Generator

Write CSS transitions for several properties with duration, delay and easing, including cubic-bezier() and steps(), plus a curve preview and reduced-motion CSS.

View all tools
ResultUpdates as you type
.button {
  transition:
    opacity 240ms ease,
    transform 240ms ease;
}

@media (prefers-reduced-motion: reduce) {
  .button {
    transition: none;
  }
}

How to use CSS Transition Generator

List the properties to animate, set the duration and delay in milliseconds and pick a timing function, or enter your own cubic-bezier() or steps(). Set the selector, choose shorthand or longhand, and copy the CSS.

  1. List the propertiesEnter properties separated by commas, such as opacity, transform. Each one gets its own transition entry.
  2. Set timing and easingChoose the duration and delay in ms and an easing preset, or Custom for cubic-bezier() or steps().
  3. Check the demo and copyWatch the curve and the moving dot, keep the reduced-motion option on, then copy the CSS.

Several properties in one transition

In the transition shorthand, commas separate whole transitions, and each one needs its own duration. Entering opacity, transform therefore produces transition: opacity 240ms ease, transform 240ms ease; so both properties animate. Writing transition: opacity, transform 240ms instead would give opacity a duration of 0. A delay is added to each entry, for example opacity 240ms ease 100ms. Tick Use longhand properties to get transition-property, transition-duration, transition-timing-function and transition-delay as four separate lines.

Easing, performance and reduced motion

ease starts quickly and slows towards the end, linear keeps an even pace, and easeOutBack overshoots the end before settling. In a custom cubic-bezier(), the first and third numbers are x values and must be between 0 and 1, while steps(4, end) jumps in four steps. By default an @media (prefers-reduced-motion: reduce) block sets transition: none for people who ask their system for less motion. Animating width, height, top, margin or padding forces layout and can stutter, so the tool suggests transform instead.

Accuracy and data handling

After adding generated code to a project, test it in the target browsers and responsive sizes. The calculation runs in your current browser; the tool code does not send the input to a processing API.

Often Used Together

Next step

FAQ

What's the difference between CSS transition and animation?

A transition runs when a property value changes, for example on hover, and moves between just two states. An animation uses @keyframes, can have many steps and can start on its own or loop.

What's the difference between ease and linear?

linear moves at a constant speed. ease, the default timing function, starts quickly and slows towards the end, which feels more natural. Use cubic-bezier() for full control over the curve.

Why isn't my CSS transition working?

Common causes: the property can't be interpolated (display needs transition-behavior: allow-discrete), the start and end values are the same, the duration is 0, or the user has reduced motion turned on.

More Frontend Tools

Related tools