perf(animations): refactor ShiftableToolsGrid, cursor, hero & sections to locked 60-120fps with zero layout thrashing

This commit is contained in:
2026-11-04 18:48:24 +05:30
parent d9ef1497a3
commit 51afbf573b
9 changed files with 249 additions and 147 deletions
@@ -120,8 +120,13 @@ export function RecommendedAppsSection({
return (
<div
key={slug}
className="group relative flex flex-col justify-between rounded-3xl bg-white border border-slate-200/90 p-7 shadow-cream-sm hover:shadow-cream-lg transition-all duration-300 hover:-translate-y-1 hover:border-blue-400/60"
className="group relative flex flex-col justify-between rounded-3xl bg-white border border-slate-200/90 p-7 shadow-cream-sm transition-[transform,border-color] duration-300 ease-[cubic-bezier(0.16,1,0.3,1)] hover:-translate-y-1 hover:border-blue-400/60 will-change-transform transform-gpu"
>
{/* GPU Shadow Elevation Layer */}
<div
className="absolute -inset-px rounded-3xl shadow-cream-lg opacity-0 group-hover:opacity-100 transition-opacity duration-500 ease-[cubic-bezier(0.16,1,0.3,1)] pointer-events-none"
aria-hidden="true"
/>
<div>
{/* Top App Icon & Rating */}
<div className="flex items-center justify-between mb-5">
@@ -168,10 +173,10 @@ export function RecommendedAppsSection({
<div className="pt-6 mt-5 border-t border-slate-100">
<Link
href={`/apps/${slug}`}
className="w-full flex items-center justify-center gap-2 py-3.5 rounded-xl text-xs font-bold text-white bg-slate-950 group-hover:bg-blue-600 transition-all duration-300 shadow-sm group-hover:shadow-md"
className="w-full flex items-center justify-center gap-2 py-3.5 rounded-xl text-xs font-bold text-white bg-slate-950 group-hover:bg-blue-600 transition-colors duration-300 ease-[cubic-bezier(0.16,1,0.3,1)] shadow-sm"
>
<span>Get App & QR Code</span>
<ArrowRight className="w-3.5 h-3.5 transition-transform group-hover:translate-x-1" />
<ArrowRight className="w-3.5 h-3.5 transition-transform duration-300 ease-[cubic-bezier(0.16,1,0.3,1)] group-hover:translate-x-1" />
</Link>
</div>
</div>