Sortable Transitions
Sortable items automatically animate when their position changes:Transition Properties
duration- Animation length in milliseconds (default:250)easing- CSS easing function (default:'cubic-bezier(0.25, 1, 0.5, 1)')idle- Whether to animate position changes when not dragging (default:false)
Default Transition Configuration
The default sortable transition provides smooth, natural movement:- Uses a 250ms duration for quick but visible movement
- Applies a custom cubic-bezier for natural acceleration
- Only animates during active drag operations
Custom Easing Functions
Use different easing functions to change animation feel:Idle Transitions
Enableidle to animate items even when not dragging:
Disabling Transitions
Disable transitions by settingtransition to null:
How Transitions Work
Sortable transitions use the FLIP technique (First, Last, Invert, Play):- First - Record the element’s initial position
- Last - Update the DOM and record the final position
- Invert - Calculate the difference and apply a transform
- Play - Animate the transform back to 0
Drag Overlay Animations
Customize the drag overlay appearance during drag operations:Styling During Drag States
Apply different styles based on drag state:CSS-Based Animations
Combine with CSS for additional effects:CSS Layers Support
Dnd-kit works seamlessly with CSS layers:Performance Optimization
The library automatically optimizes animations:Transform-Based Movement
Animations use CSStranslate instead of top/left for better performance:
Canceling CSS Transitions
The library cancels conflicting CSS transitions before measuring:Reduced Motion Support
The library automatically respects user motion preferences:Advanced: Custom Animation Hook
Create a reusable hook for consistent animations:Next Steps
1
Experiment with Easing
Try different easing functions to find the right feel for your interface
2
Test Performance
Profile animations with large lists to ensure smooth 60fps rendering
3
Add Visual Feedback
Combine transitions with accessibility features for comprehensive UX