Component & Layout

List Item Enter/Exit

Also called AnimatePresence, TransitionGroup, Animated list

Items fade and slide in when added and animate out when removed while neighbours close the gap.

Todo lists, notifications, cart items

  • fade + slide
  • height collapse
  • staggered entrance

View demo source

Prompt

Replace [where] with the part of your page and paste the prompt into your AI agent. Each prompt includes the name of the motion, so next time you can simply ask for it by name.

Add a "List Item Enter/Exit" animation (also called an animated list) to [where].
A new item should first open up its space and then fade and slide in; a removed item should fade out first and then collapse so its neighbours close the gap smoothly.
Keep a removed item in place until its exit has finished, so the list never jumps when items are added or removed.

Replace [where] with the part of your page and paste the prompt into your AI agent. Each prompt includes the name of the motion, so next time you can simply ask for it by name.