Skip to content
Design System
GitHub

Sortable

v0.23.0Beta

A list or grid people reorder by dragging a handle, by touch or by keyboard, with announcements (dnd-kit).

API reference

Generated from the types. Every part also takes className.

Sortable

valuerequired
T[]
onValueChangerequired
(next: T[]) => void
getIdrequired
(item: T) => UniqueIdentifier
getLabel
(item: T) => string
layout
"grid" | "list" = "list"
renderOverlay
(item: T) => ReactNodeA copy that follows the pointer while the item stays as a faded placeholder. Without it the item itself follows.
labels
Partial<SortableLabels>What screen readers hear while an item moves, to translate it.
childrenrequired
ReactNode

SortableItem

idrequired
UniqueIdentifier
childrenrequired
ReactNode

SortableHandle

labelrequired
string