CRM Dashboard with Cool Animations
Here's a design concept for an elegant, animated CRM dashboard using HTML, CSS, and JavaScript. This design features smooth transitions, animated charts, and interactive elements.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Animated CRM Dashboard</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<style>
:root {
--primary: #4361ee;
--secondary: #3f37c9;
--accent: #4895ef;
--light: #f8f9fa;
--dark: #212529;
--success: #4cc9f0;
--warning: #f72585;
--info: #560bad;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
background-color: #f5f7fa;
color: var(--dark);
overflow-x: hidden;
}
.dashboard {
display: grid;
grid-template-columns: 250px 1fr;
min-height: 100vh;
transition: all 0.3s ease;
}
/* Sidebar */
.sidebar {
background: linear-gradient(135deg, var(--primary), var(--secondary));
color: white;
padding: 20px 0;
box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
position: relative;
z-index: 10;
transform: translateX(0);
transition: transform 0.3s ease;
}
.sidebar.collapsed {
transform: translateX(-230px);
}
.sidebar-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 20px 20px;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.logo {
font-size: 1.5rem;
font-weight: 700;
display: flex;
align-items: center;
gap: 10px;
}
.logo i {
color: var(--accent);
}
.toggle-btn {
background: none;
border: none;
color: white;
font-size: 1.2rem;
cursor: pointer;
transition: transform 0.3s ease;
}
.toggle-btn:hover {
transform: scale(1.1);
}
.sidebar.collapsed .toggle-btn {
transform: rotate(180deg);
position: absolute;
right: -40px;
top: 20px;
background: var(--primary);
width: 40px;
height: 40px;
border-radius: 0 5px 5px 0;
}
.nav-menu {
margin-top: 20px;
}
.nav-item {
padding: 12px 20px;
display: flex;
align-items: center;
gap: 10px;
cursor: pointer;
transition: all 0.3s ease;
position: relative;
overflow: hidden;
}
.nav-item:hover {
background: rgba(255, 255, 255, 0.1);
}
.nav-item.active {
background: rgba(255, 255, 255, 0.2);
}
.nav-item.active::before {
content: '';
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 4px;
background: var(--accent);
}
.nav-item i {
font-size: 1.1rem;
min-width: 20px;
}
/* Main Content */
.main-content {
padding: 20px;
transition: all 0.3s ease;
}
.main-content.expanded {
margin-left: -250px;
}
.header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 30px;
animation: fadeIn 0.5s ease;
}
.page-title h1 {
font-size: 1.8rem;
color: var(--dark);
}
.user-actions {
display: flex;
align-items: center;
gap: 20px;
}
.search-bar {
position: relative;
}
.search-bar input {
padding: 10px 15px 10px 40px;
border-radius: 30px;
border: 1px solid #ddd;
width: 250px;
transition: all 0.3s ease;
}
.search-bar input:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
width: 300px;
}
.search-bar i {
position: absolute;
left: 15px;
top: 50%;
transform: translateY(-50%);
color: #777;
}
.user-profile {
display: flex;
align-items: center;
gap: 10px;
cursor: pointer;
}
.user-avatar {
width: 40px;
height: 40px;
border-radius: 50%;
background: var(--primary);
display: flex;
align-items: center;
justify-content: center;
color: white;
font-weight: bold;
transition: transform 0.3s ease;
}
.user-profile:hover .user-avatar {
transform: scale(1.1);
}
/* Stats Cards */
.stats-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 20px;
margin-bottom: 30px;
}
.stat-card {
background: white;
border-radius: 10px;
padding: 20px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
transition: all 0.3s ease;
position: relative;
overflow: hidden;
animation: slideUp 0.5s ease;
}
.stat-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}
.stat-card::after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 5px;
background: linear-gradient(90deg, var(--primary), var(--accent));
}
.stat-card:nth-child(2)::after {
background: linear-gradient(90deg, var(--success), #4cc9f0);
}
.stat-card:nth-child(3)::after {
background: linear-gradient(90deg, var(--warning), #f72585);
}
.stat-card:nth-child(4)::after {
background: linear-gradient(90deg, var(--info), #560bad);
}
.stat-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 15px;
}
.stat-title {
color: #777;
font-size: 0.9rem;
}
.stat-icon {
width: 40px;
height: 40px;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
color: white;
font-size: 1.2rem;
background: var(--primary);
}
.stat-card:nth-child(2) .stat-icon {
background: var(--success);
}
.stat-card:nth-child(3) .stat-icon {
background: var(--warning);
}
.stat-card:nth-child(4) .stat-icon {
background: var(--info);
}
.stat-value {
font-size: 1.8rem;
font-weight: 700;
margin-bottom: 5px;
}
.stat-change {
display: flex;
align-items: center;
gap: 5px;
font-size: 0.9rem;
}
.stat-change.positive {
color: #28a745;
}
.stat-change.negative {
color: #dc3545;
}
/* Charts Section */
.charts-grid {
display: grid;
grid-template-columns: 2fr 1fr;
gap: 20px;
margin