Foundation
MotionGood animation feels effortless, but the principles behind it are deliberate. This crash course explains why certain motion patterns work and how to apply them in our products.
Aimed at frontend engineers and UX designers working within the Svenska Spel design system.
The illusion of speed
Perceived performance matters as much as actual performance. A faster-spinning loader makes an interface feel quicker, even when load times are identical.
Both spinners below run for the same duration. The faster rotation creates a stronger sense of responsiveness — a simple trick we use across Svenska Spel products.
Slow
2s per rotation
Fast
0.6s per rotation
Easings — the main ingredient
Easing defines how a value changes over time. It is the single most important factor in whether an animation feels polished or broken. The wrong curve can make a good interaction feel sluggish; the right one makes it feel instant.
In our design system, easing directly influences perceived speed. Choosing the correct curve is often more impactful than adjusting duration.
Ease-in vs ease-out
Both dropdowns below use the same 300ms duration. The left uses ease-in and feels noticeably slower. The right uses ease-out and feels responsive immediately.
Ease-in
cubic-bezier(0.55, 0.085, 0.68, 0.53)
Ease-out
cubic-bezier(0.25, 0.46, 0.45, 0.94)
If every animation in your product used ease-in, the entire interface would feel slower than it actually is. Below we cover each easing type and when to apply it.
Ease-out
Our default curve for user-initiated interactions. Ease-out starts fast and decelerates, giving immediate visual feedback when a user opens a dropdown, modal, or tooltip.
Use this for most enter and exit animations across Svenska Spel products. It communicates responsiveness — the interface reacts the moment the user acts.
Ease-in-out
Accelerates then decelerates — like a car pulling away and coming to a stop. Use this for elements already visible on screen that need to move to a new position or morph into a different shape. Common cases include reordering lists and layout shifts.
Ease-in
The opposite of ease-out: starts slowly and accelerates. This makes interactions feel unresponsive because the user sees no immediate reaction. Avoid it for UI transitions.
Reducing the duration does not fix the problem. The curve shape itself works against user expectation — our brains expect motion to settle at the end, not accelerate into it.
Avoid ease-in for UI animations
It makes interfaces feel sluggish. Use ease-out for entrances and user-initiated interactions instead.
Ease-out vs ease-in
Compare the two curves. The steeper start of ease-out is what delivers that feeling of immediacy we want throughout our products.
Ease-out (recommended)
Ease-in (avoid)
In short: ease-in makes the UI feel slow. Default to ease-out.
Linear
Constant speed with no acceleration or deceleration. This feels mechanical and unnatural for UI transitions. Reserve linear exclusively for continuous animations such as loading spinners and marquees.
Ease
Similar to ease-in-out but asymmetrical — it starts faster and settles more gently. We use this primarily for hover states and subtle property transitions such as colour, background-colour, and opacity.
For small, non-spatial state changes, ease provides an elegant feel without drawing attention away from the content.
Custom easings
When built-in CSS easings are not expressive enough, use these custom cubic-bezier curves by Benjamin De Cock. They provide stronger acceleration profiles for more dramatic transitions.
Variable names reference the mathematical functions that define them. Higher-order functions (quad, cubic, quart, quint, expo) produce increasingly pronounced easing effects.
Ease-in (Usually avoided for UI animations)
--ease-in-quad
Subtle — accelerates from rest. Good for small UI elements entering.
cubic-bezier(.55, .085, .68, .53)
--ease-in-cubic
Emphasised — starts slowly and gains speed noticeably. Good for exits.
cubic-bezier(.550, .055, .675, .19)
--ease-in-quart
Strong — heavy acceleration for larger movements.
cubic-bezier(.895, .03, .685, .22)
--ease-in-quint
Expressive — dramatic launch with very aggressive acceleration.
cubic-bezier(.755, .05, .855, .06)
--ease-in-expo
Energetic — barely moves at first, then rapidly takes off.
cubic-bezier(.95, .05, .795, .035)
--ease-in-circ
Natural — smooth, physical acceleration inspired by circular motion.
cubic-bezier(.6, .04, .98, .335)
Ease-out (recommended)
--ease-out-quad
Subtle — fast start with a gentle settle. Great default for entrances.
cubic-bezier(.25, .46, .45, .94)
--ease-out-cubic
Emphasised — polished deceleration with responsive feel.
cubic-bezier(.215, .61, .355, 1)
--ease-out-quart
Strong — pronounced slowdown that adds a sense of weight.
cubic-bezier(.165, .84, .44, 1)
--ease-out-quint
Expressive — powerful deceleration with a premium feel.
cubic-bezier(.23, 1, .32, 1)
--ease-out-expo
Energetic — covers most distance immediately, then settles softly.
cubic-bezier(.19, 1, .22, 1)
--ease-out-circ
Natural — smooth arrival with an organic slowdown.
cubic-bezier(.075, .82, .165, 1)
Ease-in-out
--ease-in-out-quad
Subtle — balanced acceleration and deceleration. Versatile and safe.
cubic-bezier(.455, .03, .515, .955)
--ease-in-out-cubic
Emphasised — smooth and symmetrical with more character than quad.
cubic-bezier(.645, .045, .355, 1)
--ease-in-out-quart
Strong — pronounced motion for larger transitions.
cubic-bezier(.77, 0, .175, 1)
--ease-in-out-quint
Expressive — dramatic movement with clear takeoff and landing.
cubic-bezier(.86, 0, .07, 1)
--ease-in-out-expo
Energetic — slow start and finish, rapid movement through the middle.
cubic-bezier(1, 0, 0, 1)
--ease-in-out-circ
Natural — organic motion with smooth takeoff and landing.
cubic-bezier(.785, .135, .15, .86)