lib/reorder-motion
Variables
Section titled “Variables”reorderKeyAttribute
Section titled “reorderKeyAttribute”
constreorderKeyAttribute:"data-reorder-key"="data-reorder-key"
The attribute that names one reorderable child of the observed container.
Functions
Section titled “Functions”useReorderMotion()
Section titled “useReorderMotion()”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.
Parameters
Section titled “Parameters”container
Section titled “container”RefObject<HTMLElement | null>
readonly string[]
Returns
Section titled “Returns”void