Skip to content

lib/reorder-motion

const reorderKeyAttribute: "data-reorder-key" = "data-reorder-key"

The attribute that names one reorderable child of the observed container.

useReorderMotion(container, order): void

Glide keyed children from their previous to their new positions whenever the order changes (FLIP on the Web Animations API). Duration and easing come from the Stipe motion tokens, which resolve to 0ms under reduced motion, so no animation runs there. Children opt in with data-reorder-key.

RefObject<HTMLElement | null>

readonly string[]

void