CSS Transition Generator
Build smooth CSS transitions visually. Add multiple layers, choose timing functions, set delay — copy the CSS in one click.
Transition Layers
Layer Properties
Live Preview
Hover the box to preview the transition
CSS Output
transition: opacity 0.3s ease,
transform 0.3s ease;Timing Function Reference
ease Slow start & end (default)linear Constant speedease-in Starts slow, ends fastease-out Starts fast, ends slowease-in-out Slow on both endsstep-start Jump at startAbout the CSS Transition Generator
The CSS Transition Generator lets you build transition properties
visually — no manual CSS editing required. Add multiple transition layers for different CSS properties,
adjust duration, choose a timing function, set a delay, and watch the live preview react instantly.
CSS transitions are one of the most powerful tools for creating smooth, polished UI interactions.
This generator supports all standard transition-property values, the five CSS timing functions plus cubic-bezier() and steps(),
and up to six simultaneous layers so you can fine-tune how each property animates independently.
How to Generate a CSS Transition
- Click a Preset to load a ready-made transition set, or start from the defaults.
- Click + Add to add a new layer for an additional CSS property.
- Click any layer in the list to make it active and edit its settings.
- Select the Property you want to animate (e.g.
opacity,transform). - Drag the Duration slider to control how long the transition takes.
- Choose a Timing Function —
ease-outfeels natural for most UI interactions. - Set a Delay to stagger transitions for a cascading effect.
- Hover over the preview box to see the transitions in action.
- Click Copy CSS to grab the generated
transitionrule.
Common Use Cases for CSS Transitions
- Button hover effects — Smoothly animate
background-color,box-shadow, andtransformon hover for polished button interactions. - Fade in/out — Transition
opacityto softly reveal or hide content like tooltips, modals, and dropdowns. - Slide and reveal — Combine
max-heightortransformtransitions to create accordion and drawer expand animations. - Color scheme changes — Smoothly switch
background-colorandcolorwhen toggling dark mode or theming. - Staggered cascades — Use
transition-delayon list items to animate them in sequence for a flowing entrance effect. - Form focus states — Transition
border-color,box-shadow, andbackground-coloron inputs to give clear, satisfying focus feedback.
CSS Transition FAQ
What is the difference between a CSS transition and a CSS animation?
A transition interpolates between two states (from and to) triggered by a state change like :hover. An @keyframes animation runs independently and can loop, reverse, and define multiple intermediate states without any trigger.
Can I transition multiple properties at once?
Yes. The transition property accepts a comma-separated list, allowing each property to have its own duration, timing function, and delay. Using transition: all is a shortcut but can be less performant — prefer listing specific properties.
Which properties can be transitioned?
Most properties with numeric or color values can be transitioned: opacity, transform, color, background-color, width, height, border-radius, box-shadow, and more. Discrete properties like display cannot be transitioned.
What is a transition timing function?
The timing function controls the rate of change over the transition duration. ease is the default with a slow start and end. linear keeps constant speed. ease-out starts fast and decelerates — great for enter animations. cubic-bezier() lets you define a fully custom curve.
Should I use `transition: all` or list specific properties?
Listing specific properties is recommended for performance. transition: all watches every property for changes, which can cause unexpected animations and reduce rendering performance on complex elements.
Are CSS transitions hardware-accelerated?
Transitions on transform and opacity are composited on the GPU in modern browsers, making them the smoothest and most performant properties to animate. Avoid transitioning layout-affecting properties like width or margin in performance-critical UIs.