Grid Layout - Copy this React, Tailwind Component to your project
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Responsive Dashboard</title> <!-- Bootstrap CSS --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.0/css/bootstrap.min.css"> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css"> <style> body { background-color: #f8f9fa; margin: 0; padding: 0; height: 100vh; display: flex; justify-content: center; align-items: center; } .container-fluid { width: 95%; } .card { border-radius: 12px; border: none; box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15); padding: 15px; transition: transform 0.3s ease; background-color: white; } h4{ font-weight: bold; color: #6c757d; } h6 { font-weight: bold; color: #6c757d; } h2 { color: #007bff; font-size: 2rem; } .dashboard-title { font-size: 2.5rem; font-weight: bold; color: #343a40; display: flex; align-items: center; justify-content: center; gap: 20px; margin-bottom: 50px; } .dashboard-title i { color: #007bff; } /* Table Styling */ .custom-table { border-radius: 8px; overflow: hidden; background-color: white; } .custom-table thead { background-color: #343a40; color: white; } .custom-table th { background: #4169E1; color: white; padding: 12px; text-align: left; border-bottom: 1px solid #ddd; } .custom-table td { padding: 12px; text-align: left; border-bottom: 1px solid #ddd; } .custom-table tbody tr:hover { background-color: #f1f1f1; } canvas { width: 100% !important; height: auto !important; } @media (max-width: 768px) { h2 { font-size: 1.5rem; } } </style> </head> <body> <div class="container-fluid"> <h1 class="dashboard-title"> <i class="fas fa-chart-line"></i> Responsive Dashboard </h1> <div class="row g-2"> <!-- First Card: Department Dropdown --> <div class="col-lg-3 col-md-6"> <div class="card text-center"> <h6>Select Department</h6> <select class="form-select" id="departmentSelect"> <option value="HR">HR</option> <option value="Engineering">Engineering</option> <option value="Marketing">Marketing</option> <option value="Finance">Finance</option> </select> </div> </div> <!-- Second Card: Total Applicants --> <div class="col-lg-3 col-md-6"> <div class="card text-center"> <h6>Total Applicants</h6> <h2 id="totalApplicants">1,235</h2> </div> </div> <!-- Third Card: Total Hiring --> <div class="col-lg-3 col-md-6"> <div class="card text-center"> <h6>Total Hiring</h6> <h2 id="totalHiring">345</h2> </div> </div> <!-- Fourth Card: Hiring --> <div class="col-lg-3 col-md-6"> <div class="card text-center"> <h6>Hiring</h6> <h2 id="hiring">89</h2> </div> </div> </div> <!-- Second Row: Chart and Table --> <div class="row mt-3"> <div class="col-md-12"> <div class="card"> <div class="row"> <!-- Bar Chart --> <div class="col-lg-6 col-md-12"> <div class="card"> <canvas id="barChart"></canvas> </div> </div> <!-- Table --> <div class="col-lg-6 col-md-12"> <div class="card"> <h4>Employee Details</h4> <table class="table custom-table"> <thead> <tr> <th>Name</th> <th>Position</th> <th>Department</th> <th>Salary</th> <th>Date Hired</th> </tr> </thead> <tbody id="employeeTable"> <tr><td>John Doe</td><td>Software Engineer</td><td>Engineering</td><td>$80,000</td><td>2024-02-15</td></tr> <tr><td>Jane Smith</td><td>Marketing Manager</td><td>Marketing</td><td>$75,000</td><td>2024-03-10</td></tr> <tr><td>Emily Johnson</td><td>HR Specialist</td><td>HR</td><td>$60,000</td><td>2024-01-25</td></tr> <tr><td>Jane Smith</td><td>Marketing Manager</td><td>Marketing</td><td>$75,000</td><td>2024-03-10</td></tr> <tr><td>Emily Johnson</td><td>HR Specialist</td><td>HR</td><td>$60,000</td><td>2024-01-25</td></tr> <tr><td>Jane Smith</td><td>Marketing Manager</td><td>Marketing</td><td>$75,000</td><td>2024-03-10</td></tr> <tr><td>Emily Johnson</td><td>HR Specialist</td><td>HR</td><td>$60,000</td><td>2024-01-25</td></tr> </tbody> </table> </div> </div> </div> </div> </div> </div> </div> <script> $(document).ready(function () { // Bar chart var ctx = document.getElementById('barChart').getContext('2d'); var myChart = new Chart(ctx, { type: 'bar', data: { labels: ['HR', 'Engineering', 'Marketing', 'Finance'], datasets: [{ label: 'Hires', data: [50, 120, 80, 60], backgroundColor: ['#007bff', '#28a745', '#dc3545', '#ffc107'] }] }, options: { responsive: true, maintainAspectRatio: false, plugins: { legend: { display: false } } } }); // Change values based on department selection $('#departmentSelect').change(function () { let selectedDept = $(this).val(); let applicantData = { 'HR': 400, 'Engineering': 700, 'Marketing': 350, 'Finance': 200 }; let hiringData = { 'HR': 120, 'Engineering': 250, 'Marketing': 100, 'Finance': 80 }; $('#totalApplicants').text(applicantData[selectedDept]); $('#totalHiring').text(hiringData[selectedDept]); $('#hiring').text(Math.floor(hiringData[selectedDept] / 3)); }); }); </script> </body> </html> in this page build a beautiful header title