Menu
CoddyTech

Responsive Dashboard

Part of the Fundamentals section of Coddy's Tailwind CSS journey. Lesson 55 of 55.

Build this stage of the studio dashboard from the supplied files. Keep everything from the previous steps. Define a theme color token named night with value #162438. Configure dark variants to follow the dark class toggled by the supplied Theme button. In light mode keep the white shell and black text. In dark mode the shell uses the night color, its text is white and all metric-card borders are white. Toggling back must restore the light colors. Keep every responsive layout and control behavior working in both themes. Do not edit the locked JavaScript.

challenge icon

Challenge

Hard

Keep everything from the previous steps. Define a theme color token named night with value #162438. Configure dark variants to follow the dark class toggled by the supplied Theme button. In light mode keep the white shell and black text. In dark mode the shell uses the night color, its text is white and all metric-card borders are white. Toggling back must restore the light colors. Keep every responsive layout and control behavior working in both themes. Do not edit the locked JavaScript.

Keep the supplied content and element IDs. Edit the HTML utility classes or the requested CSS. Click Run preview to refresh the preview after edits, then use Check/Run code to grade your work.

Try it yourself

<!doctype html>
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Practice studio</title><link rel="stylesheet" href="./styles.css"></head><body>
<main id="dashboard" class="w-full max-w-4xl mx-auto p-6 bg-white text-black rounded-xl">
  <header id="header" class="flex flex-col sm:flex-row justify-between gap-4"><h1 id="heading" class="text-2xl font-bold">Studio overview</h1><button id="theme-toggle" class="px-3 py-2 border rounded-lg">Theme</button></header>
  <div id="layout" class="grid grid-cols-1 lg:grid-cols-[160px_1fr] gap-6">
    <nav id="sidebar" class="hidden lg:block" aria-label="Dashboard sections"><a class="block px-2 py-2" href="#stats">Overview</a><a class="block px-2 py-2" href="#activity">Activity</a></nav>
    <section><div id="stats" class="grid grid-cols-1 md:grid-cols-3 gap-4">
      <article id="visits" class="p-4 border border-black rounded-lg"><h2>Visits</h2><p>240</p></article>
      <article id="bookings" class="p-4 border border-black rounded-lg"><h2>Bookings</h2><p>18</p></article>
      <article id="rating" class="p-4 border border-black rounded-lg"><h2>Rating</h2><p>4.8</p></article>
    </div><section id="activity"><h2>Recent activity</h2><p>New pottery booking</p></section>
    <button id="export" class="mr-4 mt-4 px-3 py-2 border rounded-lg opacity-100 hover:opacity-60 outline-0 focus:outline-2 focus:outline-solid focus:outline-black">Export summary</button><button id="archive" disabled class="mt-4 px-3 py-2 border rounded-lg opacity-100 disabled:opacity-40">Archive unavailable</button>
    </section>
  </div>
</main>
<script src="./controls.js"></script>
</body></html>
quiz iconTest yourself

This lesson includes a short quiz. Start the lesson to answer it and track your progress.

All lessons in Fundamentals