Minimalist Heatmap - MeggiTools
Run
Toggle Theme
Share Link
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Minimalist Heatmap</title> <style> body { font-family: 'Helvetica Neue', sans-serif; background-color: #f0f2f5; margin: 0; padding: 20px; display: flex; justify-content: center; align-items: center; height: 100vh; } .minimalist-table { width: 100%; max-width: 600px; border-collapse: collapse; background-color: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 8px rgba(0,0,0,0.1); } .minimalist-table th, .minimalist-table td { padding: 12px; text-align: center; border-bottom: 1px solid #ddd; } .minimalist-table th { background-color: #007BFF; color: white; } .minimalist-table td { background-color: #f9f9f9; } .minimalist-table td[data-value="low"] { background-color: #f2dede; } .minimalist-table td[data-value="medium"] { background-color: #fcf8e3; } .minimalist-table td[data-value="high"] { background-color: #dff0d8; } .minimalist-table td[data-value="very-high"] { background-color: #d9edf7; } .minimalist-table td:hover { background-color: #007BFF; color: white; } .minimalist-table td::before { content: attr(data-value); font-size: 0.75em; color: #666; } </style> </head> <body> <table class="minimalist-table"> <thead> <tr> <th>Category</th> <th>Item 1</th> <th>Item 2</th> <th>Item 3</th> <th>Item 4</th> </tr> </thead> <tbody> <tr> <td>Category 1</td> <td data-value="low">😟</td> <td data-value="medium">😐</td> <td data-value="high">😊</td> <td data-value="very-high">😁</td> </tr> <tr> <td>Category 2</td> <td data-value="high">😊</td> <td data-value="very-high">😁</td> <td data-value="low">😟</td> <td data-value="medium">😐</td> </tr> <tr> <td>Category 3</td> <td data-value="medium">😐</td> <td data-value="low">😟</td> <td data-value="very-high">😁</td> <td data-value="high">😊</td> </tr> </tbody> </table> <script> document.querySelectorAll('.minimalist-table td').forEach(cell => { cell.addEventListener('click', () => { const value = cell.getAttribute('data-value'); alert(`You clicked on a cell with value: ${value}`); }); }); </script> </body> </html>