Skip to content
IndexRequest a UIAboutContact

FLIP List Reorder Animation

A list whose items glide to their new positions when you shuffle, sort or reverse it.

Open alone ↗

AI prompt

PROMPT: PASTE INTO YOUR AI CODING TOOL
Clean UI illustration of a list reorder in motion: five rounded rows with coloured left bars and names, two rows shown mid-travel with faint motion trails and a dotted line from their old positions to the new ones, light theme, flat modern style, arrows indicating direction, no gradients. Variants: the list before and after sorting A to Z. Negative: blurred text, heavy shadows, clutter, text errors. Reduced motion: before and after states only.

About this pattern

Definition

FLIP stands for First, Last, Invert, Play. Measure where each item is, change the order, measure again, then apply a transform that moves each item back to where it was and animate that transform to zero. The DOM changes once, yet every item visibly travels.

Purpose & UX principles

  • First: record each item's position. Last: reorder the list and record again.
  • Invert: translate each item by the difference. Play: transition the transform to none.
  • Animate only transform so it stays smooth, and keep keys stable so each item is the same element.

Interaction states

  • Shuffle, Sort A to Z and Reverse buttons on a list of five items.

Motion specification

  • 320ms ease with a small stagger by position.
  • Reduced motion: the list reorders instantly.

Responsive behaviour

  • Keep durations short (250 to 350ms) for lists people use often.
  • Skip the animation for users who prefer reduced motion.

Code

HTML
<div class="bx"><div class="ac"><button class="mini" data-a="s" type="button">Shuffle</button><button class="mini" data-a="a" type="button">Sort A to Z</button><button class="mini" data-a="r" type="button">Reverse</button></div><ul class="ls" id="ls"></ul></div>

Related patterns

Drag to Reorder

↗
Drag to ReorderGestures & Touch

Shared Element Transition

↗
Shared Element TransitionMotion & Transitions

Staggered Entrance

↗
Staggered EntranceMotion & Transitions