Skip to components
DEVELOPER REFERENCE · v4.0.0

ReorderList API

Props, callbacks and methods. Select an underlined type to explore its fields, allowed values and callback arguments.

ReorderList11 props2 callbacks0 methods

Props11

ReorderList props
NameTypeDescription
itemsRequired
readonly T[]Inspect type
Ordered items to render. Each item follows the shape shown in the expanded type.
itemKeyRequired
(item: T) => string | numberInspect type
Returns a stable unique key for each reorderable item.
renderItemRequired
(item: T, index: number) => ComponentChildrenInspect type
Renders a list item from its data and index.
renderHandleOptional
((item: T, index: number) => ComponentChildren) | undefinedInspect type
Renders the drag handle for a reorderable list item.
itemAttributesOptional
((item: T, index: number) => JSX.HTMLAttributes<HTMLDivElement> & Record<string, unknown>) | undefinedInspect type
Returns additional HTML attributes for a reorderable item.
classNameOptionalstring | undefinedAdditional CSS classes applied to the component root.
rowClassNameOptional
string | ((item: T, index: number) => string) | undefinedInspect type
Additional CSS classes for the row part of the component.
endClassNameOptionalstring | undefinedAdditional CSS classes for the end part of the component.
draggedKeyOptionalstring | number | undefinedKey of the item currently being dragged.
dropIndexOptionalnumber | undefinedInsertion boundary at which the current drop indicator is shown.
emptyOptional
ComponentChildrenInspect type
Empty-state flag or empty-state content, according to the declared type.

Events and callbacks2

ReorderList events and callbacks
NameTypeDescription
onDragOverRequired
(event: DragEvent, boundary: number) => voidInspect type
Handles drag movement over an insertion boundary; receives its index.
onDropRequired
(event: DragEvent, boundary: number) => voidInspect type
Handles a drop at the supplied insertion boundary.

Methods0

No component-specific imperative methods. Use props and callbacks to control this component.