/* ── ANIMATED DASHBOARD PREVIEW ────────────────────────────────────── */ function AnimatedDashboard({ compact = false }) { const [leads, setLeads] = useState(248); const [winRate, setWinRate] = useState(68); const [newWeek, setNewWeek] = useState(42); const [pulseCol, setPulseCol] = useState(0); // which column gets a new card const [flash, setFlash] = useState(false); // tick counters useEffect(() => { const t = setInterval(() => { setLeads(v => v + Math.floor(Math.random() * 3)); setNewWeek(v => v + (Math.random() > 0.6 ? 1 : 0)); setWinRate(v => Math.max(54, Math.min(78, v + (Math.random() - 0.5) * 1.2))); setPulseCol(c => (c + 1) % 3); setFlash(true); setTimeout(() => setFlash(false), 600); }, 2400); return () => clearInterval(t); }, []); const colors = ["#3b82f6", "#8b5cf6", "#10b981"]; const statBg = [ "linear-gradient(135deg,#3b82f6,#1d4ed8)", "linear-gradient(135deg,#8b5cf6,#6d28d9)", "linear-gradient(135deg,#10b981,#047857)", ]; // Sparkline path animates between two values const sparkPath = "M 10 70 L 60 50 L 110 60 L 160 30 L 210 38 L 260 18 L 320 42 L 350 30"; const sparkArea = "M 10 70 L 60 50 L 110 60 L 160 30 L 210 38 L 260 18 L 320 42 L 350 30 L 350 95 L 10 95 Z"; const dashedPath = "M 10 82 L 60 78 L 110 80 L 160 70 L 210 64 L 260 56 L 320 48 L 350 44"; return (
{/* window chrome */}
app.kredoo.io / dashboard LIVE
{/* sidebar */}
{[ { l: "Pipeline", active: true, color: "#3b82f6" }, { l: "Leads", color: "#fff" }, { l: "Inbox", color: "#fff" }, { l: "Flows", color: "#fff" }, { l: "Reports", color: "#fff" }, ].map((it, i) => (
{it.active && } {it.l}
))}
A
Alex M.
Pro plan
{/* main */}
{/* header */}

Good afternoon, Alex 👋

Pipeline overview · last 7 days

{leads} leads
{/* stat row */}
{[ { v: leads, l: "Total leads" }, { v: newWeek, l: "New / week" }, { v: Math.round(winRate) + "%", l: "Win rate" }, ].map((s, i) => (
{s.v}
{s.l}
{/* sparkline */}
))}
{/* inflow chart */}

Lead inflow · 7d

New Closed
{/* moving dot on the new line */}
{/* mini kanban */}
{["New", "Qualified", "Won"].map((col, ci) => (
{col} {[12, 8, 38][ci]}
{[0, 1].map(j => (
{ci === 0 ? "New enquiry" : ci === 1 ? "Demo booked" : "Deal won"}
{ci === 0 ? "Meta Ads" : ci === 1 ? "Google · hot" : "₹4.2L · closed"}
))}
))}
{/* flash toast */} {flash && (
New lead synced
)}
); } Object.assign(window, { AnimatedDashboard });