Features of react-native-reanimated-dnd
mainThe library provides a comprehensive suite of drag-and-drop capabilities:
- Core Components:
Draggable,Droppable, andSortablecomponents. - Layout Patterns:
- Vertical & Horizontal Sortable Lists: Reorderable lists with automatic scrolling.
- Sortable Grids: 2D grid reordering with
insertandswapmodes. - Dynamic Heights: Support for sortable lists with variable item heights.
- Interaction Controls:
- Drag Handles: Dedicated regions (bars, headers, or full items) for precise control.
- Collision Detection: Algorithms including
center,intersect, andcontain. - Boundary Constraints: Keep draggables within specific areas or lock them to a specific axis.
- Custom Animations: Support for
spring,timing, or custom animation functions.
- Advanced Capabilities:
- FlatList Performance: Optional virtualization for large datasets.
- State Lifecycle: Tracking via a
Stateenum andonStateChangecallbacks (States:Idle,Dragging,Dropped). - Alignment: 9-point alignment system with custom X/Y offsets.