MÓDULO_TEÓRICO
Transforming the Dashboard for Mobile

Complete Dashboard Adaptability
In this lesson, we apply responsive prefixes to transform the Sidebar and Data Table of our Quantum Dashboard into a flawless mobile experience.
1. Toggling Elements with hidden and block
On smartphone screens, a 260px fixed sidebar monopolizes the viewport. We hide it on mobile and display it strictly on desktop:
html<aside class="hidden lg:block w-64 bg-slate-900/90 border-r border-slate-800 p-6"> <!-- Sidebar navigation visible only on desktop --> </aside>
2. Responsive Overflow-Safe Data Tables
HTML tables often break mobile viewports because column content exceeds phone width. In Tailwind, wrap the table in an overflow-x-auto container:
html<div class="bg-slate-900/60 border border-slate-800 rounded-2xl p-6"> <h3 class="text-base font-bold text-white mb-4">Active Edge Nodes</h3> <!-- Horizontal Scroll Container --> <div class="overflow-x-auto"> <table class="w-full text-left text-xs"> <thead> <tr class="border-b border-slate-800 text-slate-400 uppercase tracking-wider"> <th class="pb-3 font-semibold">Node ID</th> <th class="pb-3 font-semibold">Region</th> <th class="pb-3 font-semibold">CPU Load</th> <th class="pb-3 font-semibold">Status</th> </tr> </thead> <tbody class="divide-y divide-slate-800/60"> <tr> <td class="py-3.5 font-mono text-cyan-400 font-bold">#NX-801</td> <td class="py-3.5 text-slate-300">US-East</td> <td class="py-3.5 text-slate-300">32%</td> <td class="py-3.5"><span class="px-2.5 py-1 rounded-full text-[10px] font-bold bg-emerald-500/10 text-emerald-400">Active</span></td> </tr> <tr> <td class="py-3.5 font-mono text-cyan-400 font-bold">#NX-402</td> <td class="py-3.5 text-slate-300">EU-Central</td> <td class="py-3.5 text-slate-300">88%</td> <td class="py-3.5"><span class="px-2.5 py-1 rounded-full text-[10px] font-bold bg-amber-500/10 text-amber-400">Alert</span></td> </tr> </tbody> </table> </div> </div>
