Skip to main content

Sortable List

Reorder rows by dragging, with a pointer, a finger or the keyboard.

View as Markdown

Installation

Component API

PropTypeDefaultDescription
defaultItemsSortableListItem[]-The rows, top to bottom.
The rows, top to bottom.
itemsSortableListItem[]-
onItemsChange(items: SortableListItem[]) => void-Called with the new order after a drop.
Called with the new order after a drop.
handlebooleantrue
numberedbooleanfalseNumbers each row by its place.
Numbers each row by its place.
ariaLabelstring-Names the list for screen readers.
Names the list for screen readers.
shapenone | rounded | pillrounded
classNamestring-
focusboolean | stringtrue