feat: add column stagger + card stagger + card hover/tap animations

This commit is contained in:
Your Name
2026-02-15 20:58:53 +02:00
parent 3a3c3bd2e1
commit 1e14edda6c
3 changed files with 34 additions and 11 deletions

View File

@@ -1,6 +1,7 @@
import React from "react";
import { format, isPast, isToday } from "date-fns";
import { motion, useReducedMotion } from "framer-motion";
import { fadeSlideUp, springs } from "@/lib/motion";
import { useSortable } from "@dnd-kit/sortable";
import { CSS } from "@dnd-kit/utilities";
import type { Card, Label } from "@/types/board";
@@ -50,10 +51,14 @@ export function CardThumbnail({ card, boardLabels, columnId, onCardClick }: Card
ref={setNodeRef}
style={style}
onClick={handleClick}
className="w-full rounded-lg bg-pylon-surface shadow-sm text-left transition-all duration-200 hover:-translate-y-px hover:shadow-md"
initial={prefersReducedMotion ? false : { opacity: 0, y: -8 }}
animate={{ opacity: 1, y: 0 }}
transition={{ type: "spring", stiffness: 300, damping: 25 }}
className="w-full rounded-lg bg-pylon-surface shadow-sm text-left"
variants={fadeSlideUp}
initial={prefersReducedMotion ? false : "hidden"}
animate="visible"
whileHover={{ scale: 1.02, y: -2, boxShadow: "0 4px 12px oklch(0% 0 0 / 10%)" }}
whileTap={{ scale: 0.98 }}
transition={springs.bouncy}
layout
{...attributes}
{...listeners}
role="article"