Skip to main content

Transitions & Easing

Open in ChatGPT

Transition variables are used to provide consistent animation durations across your app. They control how long an animation takes to complete.

Example

.element {
transition: var(--dwc-transition-slow) background-color;
}

Variables

VariableDefault ValueExample
--dwc-transition-x-slow1000ms
--dwc-transition-slow500ms
--dwc-transition-medium250ms
--dwc-transition-fast150ms
--dwc-transition-x-fast50ms
--dwc-transitionvar(--dwc-transition-medium)

Easing

Easing variables define how values change over time, making transitions feel more natural.

Example

.element {
transition: transform var(--dwc-transition) var(--dwc-ease-inOutBack);
}

Try hovering over each easing preview to see its animation effect.

Variables