feat(card-sorting): gentler spring animation for locked cards

When a card transitions from being dragged to its locked position
in the prefix/suffix grid, use a gentler spring animation to make
the transition more visible and pleasing.

Animation config:
- Locked cards: tension 120, friction 26 (gentle, floaty)
- Normal cards: tension 300, friction 30 (snappy, responsive)

This allows users to see the card "gently come out of the drag"
and smoothly settle into its permanent grid position, rather than
snapping there instantly.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Thomas Hallock 2025-10-23 22:22:04 -05:00
parent ae45298ec4
commit 47189cb6e7
1 changed files with 11 additions and 4 deletions

View File

@ -782,10 +782,17 @@ function AnimatedCard({
// Position and rotation are immediate when dragging or resizing
return isDragging || isResizing
},
config: {
tension: 300,
friction: 30,
},
config: isCorrectPosition
? {
// Gentler animation when moving to locked position
tension: 120,
friction: 26,
}
: {
// Snappier for normal movements
tension: 300,
friction: 30,
},
})
return (