Boneyard Tools

CSS Transition Generator

The CSS transition shorthand packs a property, duration, timing function and delay into one line, and the order trips people up. This generator lets you pick the properties to animate, drag the duration and delay in milliseconds, and choose a preset easing or paste a custom cubic-bezier curve. A live hover box previews the motion and the exact declaration is ready to copy.

How to generate a CSS transition

  1. Click property chips to toggle what animates: opacity, transform, background-color, color, or all. Selecting several builds one comma separated segment per property.
  2. Set Duration in milliseconds with the stepper, from 0 up to 3000 in steps of 50.
  3. Set an optional Delay in milliseconds the same way, leaving it at 0 for immediate motion.
  4. Pick a Timing function from the dropdown, or type a custom value such as a cubic-bezier(...) curve in the text field below it.
  5. Hover the preview box to feel the transition, then copy the generated CSS declaration into your stylesheet.

Examples

Single property, default easing

opacity, 300ms, ease, 0ms delay
transition: opacity 300ms ease 0ms;

Two properties at once

opacity and transform, 300ms, ease, 0ms delay
transition: opacity 300ms ease 0ms, transform 300ms ease 0ms;

Custom curve with a delay

transform, 500ms, cubic-bezier(0.4, 0, 0.2, 1), 100ms delay
transition: transform 500ms cubic-bezier(0.4, 0, 0.2, 1) 100ms;

Frequently asked questions

What order does the shorthand use?

Each segment is written as property, duration, timing function, then delay, for example opacity 300ms ease 0ms. The generator always emits durations and delays in milliseconds with the ms unit, so the order is correct every time.

Why is each property a separate segment?

The transition shorthand accepts several comma separated segments, one per property. The tool builds one segment per selected chip, which is clearer than the all keyword and avoids animating properties you did not intend to.

Can I use a custom easing curve?

Yes. Choose a preset like ease-in-out, or paste a cubic-bezier(...) value into the timing text field. Your value is passed through verbatim into the output, so a curve copied from a bezier editor lands untouched in the declaration.

What is the difference between duration and delay?

Duration is how long the change takes once it begins, and delay is how long the browser waits before starting. Both are set here in milliseconds and both are capped at 3000ms in the sliders, though larger values are valid CSS.

Should I transition the all keyword?

You can select all, but naming specific properties is usually faster because the browser does not have to watch every property for changes. It also avoids surprise animations on layout properties. The generator supports both.

Do all properties share the same duration and timing?

Yes. This tool applies one duration, one timing function and one delay across every selected property. If you need different timings per property, generate the segments separately and join them with commas.

Can I animate transform and opacity for performance?

Yes, and they are good defaults. Transform and opacity can be composited by the browser without triggering layout or paint, so transitions on them tend to stay smooth. Both are offered as chips for exactly that reason.

What happens if I pick no properties?

The engine requires at least one property, so with nothing selected the preview shows an error comment instead of a declaration. Toggle any chip on and a valid transition line appears again.

Is anything sent to a server?

No. The transition string is assembled entirely in your browser and your settings are never uploaded, so the tool works offline and keeps your code local.

Learn more

Related tools