skip the tree
system / motion / lists5 rebuilds

Lists

The Lists examples of the Motion library, rebuilt in Composite: the same trigger, in steps, with the system's own parts.

the category

motion/_rebuilds
rebuilds
5
from motion+
4
easing
steps() only

motion / lists / multidimensional reorder

after a motion.dev example
drag a tile to a slot, or use the arrow keys
margin_rebuilds/​lists/​reorder-grid.tsx
Motion
Reorder, drag
here
a cut a slot
moved
the names glitch
keys
arrows, one slot

A tile moves in whole slots with the pointer or the arrow keys; the others cut to their places, and each moved name glitches.

motion / lists / to-do list

after a motion+ example
add, tick and remove tasks
margin_rebuilds/​lists/​todo-list.tsx
Motion
AnimatePresence, layout
here
a cut, then a Glitch
add
at the end
remove
a cut
original
To-do list

A new task cuts in at the end and glitches its name; a task that goes cuts out and the rest close the gap.

motion / lists / card stack

after a motion+ example
throw the top card, or use the arrow keys
margin_rebuilds/​lists/​card-stack.tsx
Motion
drag, useMotionValue
here
whole cells
throw
6 cells or more
keys
arrows, Enter
original
Card stack

The top card drags in whole cells; thrown 6 cells or more it cuts to the back and glitches. A shorter drag cuts it back.

motion / lists / infinite loading

after a motion+ example
scroll to the end of the list
margin_rebuilds/​lists/​infinite-loading.tsx
Motion
onViewportEnter
here
inView, a sentinel row
busy
1.2 s, the scan mark
rows
five a page, Step-in

The sentinel row at the end starts a made-up load with the scan mark; five rows then step in one step apart. Nothing is fetched.

motion / lists / physical stagger

after a motion+ example
press a tile: the grid steps in round it
margin_rebuilds/​lists/​staggered-grid.tsx
Motion
stagger from a point
here
play(), 6 frames
a frame
80 ms, one ring
from
the pressed tile

A press cuts the grid to nothing; then each square ring round the pressed tile steps in, one ring a frame.