SortableList (drag and drop)

Reorder by dragging, or focus a row's handle and press Up / Down. Items need a unique key; onChange receives the new order.

  • Plan
  • Steal the moon
  • Eat bananas

Props

  • items{ key, label?, ... }[]

    Items with a unique key.

  • onChange(items) => void

    Called with the new order.

  • renderItem(item, index) => ReactNode

    Renders a row’s content.

  • labelstring
    Default: 'Sortable list'

    Accessible name.

  • classNamestring
    Default: ''

    Extra classes for the root element.