Smooth animations the right way
Animate transform and opacity only, and use will-change sparingly.
CSS · Smooth animations the right wayAdvanced
.slide-panel {
transform: translateX(100%);
transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.slide-panel.open { transform: none; }
.slide-panel.animating { will-change: transform; }
/* Avoid animating width, height, top or left. They force layout on every frame. */transformopacitywill-changeperformance