Reorder

The Reorder component is a component that allows you to drag to reorder items in a list.

Basic Usage

  • 🍅 Tomato
  • 🥒 Cucumber
  • 🧀 Cheese
  • 🥬 Lettuce

Layout Usage

🍅

ReorderGroup Props

PropDefaultType
axis
y
'x' | 'y'
The axis to reorder on. To make draggable on both axes, set <ReorderItem drag />
onUpdate:values
-
(newOrder: V[]) => void
A callback to fire with the new value order dragging ends.
values
[]
V[]
The latest values state.

ReorderItem Props

PropDefaultType
value
V
The value in the list that this component represents.