feat: gesture-reactive drag overlay with tilt based on pointer velocity

This commit is contained in:
Your Name
2026-02-15 21:01:06 +02:00
parent feccc4e17a
commit 24219bb212
2 changed files with 48 additions and 16 deletions

View File

@@ -1,6 +1,6 @@
import React, { useState, useRef, useEffect, useCallback } from "react";
import { Plus } from "lucide-react";
import { motion } from "framer-motion";
import { AnimatePresence, motion } from "framer-motion";
import { staggerContainer } from "@/lib/motion";
import {
DndContext,
@@ -387,12 +387,14 @@ export function BoardView() {
</SortableContext>
{/* Drag overlay - renders a styled copy of the dragged item */}
<DragOverlay>
{activeCard ? (
<CardOverlay card={activeCard} boardLabels={board.labels} />
) : activeColumn ? (
<ColumnOverlay column={activeColumn} />
) : null}
<DragOverlay dropAnimation={null}>
<AnimatePresence>
{activeCard ? (
<CardOverlay key="card-overlay" card={activeCard} boardLabels={board.labels} />
) : activeColumn ? (
<ColumnOverlay key="column-overlay" column={activeColumn} />
) : null}
</AnimatePresence>
</DragOverlay>
</DndContext>