Dashboard Snippets — Free HTML CSS JS Dashboard Components

37 dashboard components · Stats Cards, Kanban Board, Full Layout, Activity Feed, Metric Grid, Status Page, Calendar, Notification Bell · Exports to React, Vue, Angular & Tailwind

Share & Support

What's included

Features

Dashboard layout: display:flex app shell, 180px dark sidebar, overflow-y:auto scrollable main
Stats card: IntersectionObserver threshold:0.5, obs.disconnect() for single-fire count-up
Stats card: requestAnimationFrame quartic ease-out, M/K auto-format, data-target attr
Activity heatmap: 52×7 DOM grid, 6-level colour intensity, JS loop fill
Kanban board: HTML5 draggable, dragstart/dragover/drop API, live column card count
Kanban: setTimeout(0) before .dragging prevents ghost image showing dimmed state
Notification bell: unread badge, mark-all-read, per-item read, click-outside close
User stats: SVG stroke-dashoffset ring, GitHub-style 12-week heatmap, follow toggle

About this tool

Dashboard Snippets — Free Stats Cards, Kanban Board, Full App Layout, Activity Feed & Notification Bell

Dashboard components display operational data, track progress, and enable workflow management. Building a dashboard from scratch requires solving several specific technical challenges: animated metric reveals, drag-and-drop task management, a persistent app shell layout, activity visualisation, and real-time notification state. This collection covers five essential dashboard building blocks — from animated KPI cards to a complete app layout shell.

Every snippet is plain HTML, CSS, and minimal vanilla JavaScript. No charting library, no grid framework, no component library required.

Stats Card with activity heatmap and SVG progress ring. The count-up animation uses IntersectionObserver with threshold: 0.5 — the animation fires exactly once when 50% of the element enters the viewport. obs.disconnect() prevents it from re-firing on scroll back. The animation itself uses requestAnimationFrame with a quartic ease-out curve: progress = 1 - Math.pow(1 - t, 4), where t is elapsed time divided by duration. This creates a fast-start, slow-decelerate reveal that feels dramatic. Numbers over 1000 auto-format to K; over 1000000 to M.

The activity heatmap generates a 52 × 7 grid of day cells with 6 colour intensity levels — using JavaScript to fill random (or real API) activity data into a GitHub-style contribution graph. Each cell is a small div with background colour determined by its activity count.

Dashboard Layout is a complete flex app shell: a 180px fixed dark sidebar with nav links, a top header bar, and a main content area with overflow-y: auto. The sidebar and header are fixed; the main content scrolls independently. This is the foundational structure of any admin panel or SaaS dashboard.

Kanban Board uses the HTML5 Drag and Drop API — no library. draggable="true" on each card. dragstart stores the dragged card in a variable. dragover calls e.preventDefault() to allow the drop. drop appends the stored card to the target column and updates the live card count. A setTimeout(0) delay before adding the .dragging class prevents the ghost image from showing the dimmed card state during drag.

User Stats Card features a GitHub-style 12-week activity heatmap, a circular SVG progress ring, a gradient avatar, follower/following stats, and a follow button toggle. All built with DOM manipulation and SVG — no charting library.

Notification Bell shows an unread badge count, a dropdown panel with notification items, mark-as-read per item and mark-all-read batch action, and click-outside close. The bell icon animates with a CSS ring-swing keyframe when the badge count is non-zero.

Real-world uses

Common Use Cases

SaaS admin panels, analytics dashboards, and operations tools
Dashboard Layout as the foundational app shell for any admin panel or analytics dashboard. Drop your own stats, charts, and tables into the main content area — the sidebar navigation, header, and scroll behaviour are already handled.
Project management, sprint tracking, and task workflow boards
Kanban Board for visualising work-in-progress across sprints, content calendars, bug triage queues, and sales pipeline stages. Combine with the Data Table snippet for a list/board toggle view in a project management tool.
Developer portfolio profiles and contribution activity displays
User Stats Card with a GitHub-style activity heatmap for developer portfolio pages, open source contributor profiles, and freelancer showcase sites. Wire to a real contributions API for live data — the heatmap cell structure accepts any integer activity value.
KPI metric cards with scroll-triggered animated reveals
Stats Cards with count-up animation for displaying monthly revenue, user count, conversion rate, and other key metrics on analytics overview pages. The quartic ease-out deceleration makes the numbers feel meaningful and earned as they settle on their final value.
Study IntersectionObserver, HTML5 drag-and-drop, and SVG rings
Stats card teaches IntersectionObserver with obs.disconnect() for a single-fire scroll animation — the correct pattern for most count-up uses. Kanban Board teaches the complete HTML5 Drag and Drop API without any library. Both are techniques that apply across many dashboard and data visualisation contexts.
Rapid prototype operational dashboards without charting libraries
Drop the Dashboard Layout shell into any project and replace the placeholder content. Add the Stats Cards for KPI rows. Add the Kanban Board for task tracking. The complete layout, metric display, and task management system needs no npm packages — every interaction is vanilla JavaScript.

Got questions?

Frequently Asked Questions

An IntersectionObserver is created with threshold: 0.5, watching each .number element. When 50% of the element is visible in the viewport, the observer callback fires and calls animateValue(). The critical line is obs.disconnect() inside the callback — this removes the observer immediately after the first trigger, so the animation never re-fires if the user scrolls back past the element. Without disconnect(), the count-up would restart every time the element enters the viewport.

Each card has draggable="true". dragstart sets a draggedCard variable to e.currentTarget. Each column has a dragover listener that calls e.preventDefault() — without this, the drop event does not fire. drop appends draggedCard to the column's card list container and calls updateCounts() to refresh all column totals. The setTimeout(0) delay before adding .dragging to the card prevents the browser's drag ghost image from capturing the card in its dimmed state.

The sidebar is currently a fixed 180px left panel. For mobile: @media (max-width: 768px) { .sidebar { position: fixed; left: -180px; transition: left 0.25s ease; z-index: 100; } .sidebar.open { left: 0; } .main { margin-left: 0; } }. Add a hamburger button to the header that calls sidebar.classList.toggle("open"). Add an overlay backdrop that closes the sidebar on click. The main content area automatically fills 100% width when margin-left: 0 is applied.

Yes. Dashboard Layout becomes a root Layout component that wraps all pages. Stats Cards become a StatsCard component with target, label, colour, and pct props — manage the count-up with useEffect and requestAnimationFrame. Kanban Board manages columns and cards with useState, using onDragStart, onDragOver, and onDrop React event handlers. In Next.js App Router, put the Dashboard Layout in app/dashboard/layout.tsx — it wraps all dashboard routes automatically.