Skip to content
UIGrammer
EN 中文

Animation · Transitions · 13

Drawer Slide

Drawer Slide = a panel that slides in from the edge to layer a secondary view over the page without a hard cut.

Skip to the modify prompt

Menu

Respects prefers-reduced-motion: the animation is disabled and the final state is shown.

What is a Drawer Slide?

A drawer slides a panel in from the side so a filter, menu, or detail appears without the page jumping to a new screen. Use transform: translateX only and a soft easing; pair it with a scrim that fades so the user knows the background is paused. Keep it under ~300ms or it feels sluggish.

Animation Specimen

Trigger
click
Tech
css
Duration
2.4s
Easing
cubic-bezier(0.4, 0, 0.2, 1)
Performance
transform

When to use

  • Mobile nav, filters, detail panels, cart
  • Any secondary view that should layer, not navigate

Avoid when

  • Primary navigation on desktop — a full page is clearer
  • Without a scrim — the background feels frozen, not paused

Always pair the slide with a fading scrim so users know the background is paused, not gone.

See also

Slide a drawer from the right edge: translateX(100% to 0) over 300ms with a soft easing, plus a fading scrim, transform and opacity only.