Published on

Build A Dark Mode Vs Light Mode Navigation With Tailwind CSS Like A Pro With The Help Of These 6 Tips

Dark Mode vs Light Mode Navigation

What is Tailwind CSS?

Tailwind CSS is a utility-first CSS framework that focuses on creating personalized user interfaces quickly. It can gives you all the building blocks you are able to create personalized designs without having to fight to override irritating opinionated styles. Also, Tailwind CSS is a highly configurable, low-level CSS framework.

The description of Dark Mode vs Light Mode Navigation ui component

A dark mode vs light mode navigation for tailwind ccss

Why use Tailwind CSS to make a Dark Mode vs Light Mode Navigation ui component?

  • It can make the building process of Dark Mode vs Light Mode Navigation ui component faster and more easily.
  • Enables building complex responsive layouts and components freely.
  • Minimum lines of CSS code in Dark Mode vs Light Mode Navigation component file.

The preview of Dark Mode vs Light Mode Navigation ui component

Free download of the Dark Mode vs Light Mode Navigation's source code

The source code of Dark Mode vs Light Mode Navigation ui component

<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css" rel="stylesheet">
<!-- This is an example component -->
<div class="bg-gray-200 p-10 flex flex-wrap sys-app-notCollapsed ">
  <!--this contains my photo, email and some information.-->
  <div class="p-4 w-full ">
    <div class="w-1/3 py-4 px-6 flex mx-auto ">
      <span class="px-2 mx-2 inline-block capitalize font-medium ">
        <span class="block text-xl mt-3">Built by</span>
      </span>
      <img
        src="https://lh3.googleusercontent.com/-U0lTbxzh0bE/AAAAAAAAAAI/AAAAAAAAAAA/ACHi3rdJubMZweMDYD49ddsxq1wXai_9Cg/s48-c/photo.jpg"
        alt="alt placeholder" class="w-12 h-12 mt-1 rounded-full inline-block">
      <span class="px-2 mx-2 inline-block capitalize font-medium">
        <span class="block text-xl">Hamza Nouali</span>
        <span class="block font-normal text-gray-700">Web Developer</span>
      </span>
    </div>
    <div class="p-4 text-center">
      <a href="https://twitter.com/AppClsname" target="_tab" class="p-2 mx-2 ">
        <i class="fab fa-twitter inline-block w-5">
        </i>
        <span class="mx-2 ">@ClsnameApp</span>
      </a>
      <a href="https://twitter.com/HamzaNouali3" target="_tab" class="p-2 mx-2 ">
        <i class="fab fa-twitter inline-block w-5">
        </i>
        <span class="mx-2 ">@hamzanouali</span>
      </a>
      <span class="p-2 mx-2 ">
        <i class="fas fa-envelope inline-block w-5">
        </i>
        <span class="mx-2 ">[email protected]</span>
      </span>
      <a href="https://www.linkedin.com/in/hamza-nouali-8786ab19a/" target="_tab" class="p-2 mx-2 ">
        <i class="fab fa-linkedin inline-block w-5">
        </i>
        <span class="mx-2 ">hamza nouali</span>
      </a>
    </div>
    <p class="p-4 text-center w-3/5 mx-auto">These are HTML & CSS components built using Tailwind CSS framework, you can
      download it (100% Free and well documented)
      to learn from it or even re-use it.</p>
  </div>
  <!--horizontal navigations-->
  <div class="p-4 pb-0 mx-auto flex flex-wrap ">
    <div class="p-4 w-full lg:w-1/2 bg-gray-800">
      <!--dark mode - without text - icons only-->
      <div class="p-2 text-gray-700 bg-gray-900 rounded-lg shadow-lg ">
        <span class="px-2 mr-2 border-r border-gray-800">
          <img src="https://www.freepnglogos.com/uploads/spotify-logo-png/file-spotify-logo-png-4.png"
            alt="alt placeholder" class="w-8 h-8 -mt-1 inline mx-auto">
        </span>
        <span class="px-1 hover:text-white cursor-pointer">
          <i class="fas fa-stream p-2 bg-gray-800 rounded-full">
          </i>
        </span>
        <span class="px-1 hover:text-white cursor-pointer">
          <i class="fas fa-search p-2 bg-gray-800 rounded-full">
          </i>
        </span>
        <span class="px-1 hover:text-white cursor-pointer">
          <i class="fas fa-th p-2 bg-gray-800 rounded-full">
          </i>
        </span>
        <span class="px-1 hover:text-white cursor-pointer">
          <i class="w-8 fas fa-calendar-alt p-2 bg-gray-800 rounded-full">
          </i>
        </span>
        <span class="px-1 hover:text-white cursor-pointer w-8 relative">
          <i class="fas fa-bell p-2 bg-gray-800 rounded-full">
          </i>
          <span
            class="absolute right-0 top-0 -mt-2 -mr-1 text-xs bg-red-500 text-white font-medium px-2 shadow-lg rounded-full">3</span>
        </span>
        <span class="hover:text-white cursor-pointer w-10 relative float-right mr-3">
          <i class="fas fa-user p-2 bg-gray-800 rounded-full">
          </i>
          <span
            class="absolute right-0 top-0 -mt-1 -mr-1 text-xs bg-yellow-500 text-black font-medium px-2 rounded-full">3</span>
        </span>
      </div>
    </div>
    <div class="p-4 w-full lg:w-1/2">
      <!--dark mode - without text - icons only-->
      <div class="p-2 text-gray-900 bg-white rounded-lg shadow-lg ">
        <span class="px-2 mr-2 border-r border-gray-800">
          <img src="https://www.freepnglogos.com/uploads/spotify-logo-png/file-spotify-logo-png-4.png"
            alt="alt placeholder" class="w-8 h-8 -mt-1 inline mx-auto">
        </span>
        <span class="px-1 cursor-pointer hover:text-gray-700">
          <i class="fas fa-stream p-2 bg-gray-200 rounded-full">
          </i>
        </span>
        <span class="px-1 cursor-pointer hover:text-gray-700">
          <i class="fas fa-search p-2 bg-gray-200 rounded-full">
          </i>
        </span>
        <span class="px-1 cursor-pointer hover:text-gray-700">
          <i class="fas fa-th p-2 bg-gray-200 rounded-full">
          </i>
        </span>
        <span class="px-1 cursor-pointer hover:text-gray-700">
          <i class="w-8 fas fa-calendar-alt p-2 bg-gray-200 rounded-full">
          </i>
        </span>
        <span class="px-1 w-8 relative cursor-pointer hover:text-gray-700">
          <i class="fas fa-bell p-2 bg-gray-200 rounded-full">
          </i>
          <span
            class="absolute right-0 top-0 -mt-2 -mr-1 text-xs bg-red-500 text-white font-medium px-2 shadow-lg rounded-full">3</span>
        </span>
        <span class="w-10 relative float-right mr-3 cursor-pointer hover:text-gray-700">
          <i class="fas fa-user p-2 bg-gray-200 rounded-full">
          </i>
          <span
            class="absolute right-0 top-0 -mt-1 -mr-1 text-xs bg-yellow-500 text-black font-medium px-2 rounded-full">3</span>
        </span>
      </div>
    </div>
    <div class="p-4 w-full lg:w-1/2 bg-gray-800">
      <!--dark mode - text and icons-->
      <div class="p-2 text-gray-700 bg-gray-900 rounded-lg shadow-lg font-medium capitalize">
        <span class="px-2 mr-2 border-r border-gray-800">
          <img src="https://www.freepnglogos.com/uploads/spotify-logo-png/file-spotify-logo-png-4.png"
            alt="alt placeholder" class="w-8 h-8 -mt-1 inline mx-auto">
        </span>
        <span class="px-2 py-1 cursor-pointer hover:bg-gray-800 hover:text-gray-300 text-sm rounded mb-5">
          <i class="w-8 fas fa-stream p-2 bg-gray-800 rounded-full">
          </i>
          <span class="mx-1">categories</span>
        </span>
        <span class="px-2 py-1 cursor-pointer hover:bg-gray-800 hover:text-gray-300 text-sm rounded mb-5">
          <i class="w-8 fas fa-th p-2 bg-gray-800 rounded-full">
          </i>
          <span class="mx-1">menu</span>
        </span>
        <span class="px-1 hover:text-white cursor-pointer">
          <i class="fas fa-search p-2 bg-gray-800 rounded-full">
          </i>
        </span>
        <span class="px-1 hover:text-white cursor-pointer">
          <i class="w-8 fas fa-calendar-alt p-2 bg-gray-800 rounded-full">
          </i>
        </span>
        <span class="px-1 hover:text-white cursor-pointer w-8 relative">
          <i class="w-8 fas fa-bell p-2 bg-gray-800 rounded-full">
          </i>
          <span
            class="absolute right-0 top-0 -mt-2 -mr-1 text-xs bg-red-500 text-white font-medium px-2 shadow-lg rounded-full">3</span>
        </span>
        <span class="hover:text-white cursor-pointer w-10 relative float-right mr-3">
          <i class="fas fa-user p-2 bg-gray-800 rounded-full">
          </i>
          <span
            class="absolute right-0 top-0 -mt-1 -mr-1 text-xs bg-yellow-500 text-black font-medium px-2 rounded-full">3</span>
        </span>
      </div>
    </div>
    <div class="p-4 w-full lg:w-1/2">
      <!--light mode - text and icons-->
      <div class="p-2 text-gray-900 bg-white rounded-lg shadow-lg font-medium capitalize">
        <span class="px-2 mr-2 border-r border-gray-800">
          <img src="https://www.freepnglogos.com/uploads/spotify-logo-png/file-spotify-logo-png-4.png"
            alt="alt placeholder" class="w-8 h-8 -mt-1 inline mx-auto">
        </span>
        <span class="px-2 py-1 cursor-pointer hover:bg-gray-200 hover:text-gray-700 text-sm rounded mb-5">
          <i class="w-8 fas fa-stream p-2 bg-gray-200 rounded-full">
          </i>
          <span class="mx-1">categories</span>
        </span>
        <span class="px-2 py-1 cursor-pointer hover:bg-gray-200 hover:text-gray-700 text-sm rounded mb-5">
          <i class="w-8 fas fa-th p-2 bg-gray-200 rounded-full">
          </i>
          <span class="mx-1">menu</span>
        </span>
        <span class="px-1 cursor-pointer hover:text-gray-700">
          <i class="fas fa-search p-2 bg-gray-200 rounded-full">
          </i>
        </span>
        <span class="px-1 cursor-pointer hover:text-gray-700">
          <i class="w-8 fas fa-calendar-alt p-2 bg-gray-200 rounded-full">
          </i>
        </span>
        <span class="px-1 w-8 relative cursor-pointer hover:text-gray-700">
          <i class="w-8 fas fa-bell p-2 bg-gray-200 rounded-full">
          </i>
          <span
            class="absolute right-0 top-0 -mt-2 -mr-1 text-xs bg-red-500 text-white font-medium px-2 shadow-lg rounded-full">3</span>
        </span>
        <span class="w-10 relative float-right mr-3 cursor-pointer hover:text-gray-700">
          <i class="w-8 fas fa-user p-2 bg-gray-200 rounded-full">
          </i>
          <span
            class="absolute right-0 top-0 -mt-1 -mr-1 text-xs bg-yellow-500 text-black font-medium px-2 rounded-full">3</span>
        </span>
      </div>
    </div>
  </div>
  <!--vertical navigations-->
  <div class="p-4 pt-0 mx-auto flex flex-wrap ">
    <!--dark mode - tight side navigation with yellow notification-->
    <div class="p-4 w-24 bg-gray-800">
      <div class="py-4 px-2 text-gray-700 bg-gray-900 rounded-lg text-center shadow-lg">
        <img src="https://www.freepnglogos.com/uploads/spotify-logo-png/file-spotify-logo-png-4.png"
          alt="alt placeholder" class="w-8 h-8 mx-auto mb-5">
        <span class="cursor-pointer hover:text-white px-2 block mb-5">
          <i class="fas fa-stream">
          </i>
        </span>
        <span class="cursor-pointer hover:text-white px-2 block mb-5">
          <i class="fas fa-search p-2 bg-gray-800 rounded-full">
          </i>
        </span>
        <span class="cursor-pointer hover:text-white px-2 block mb-5 relative">
          <i class="fas fa-users">
          </i>
          <span
            class="absolute right-0 top-0 -mt-2 text-xs bg-yellow-500 text-black font-medium px-2 shadow-lg rounded-full border-2 border-gray-900">3</span>
        </span>
        <span class="cursor-pointer hover:text-white px-2 block mb-5">
          <i class="fas fa-calendar-alt">
          </i>
        </span>
      </div>
    </div>
    <div class="p-4 w-24 bg-gray-800">
      <!--dark mode - tight side navigation with red notification-->
      <div class="py-4 px-2 text-gray-700 bg-gray-900 rounded text-center shadow-lg">
        <img src="https://www.freepnglogos.com/uploads/spotify-logo-png/file-spotify-logo-png-4.png"
          alt="alt placeholder" class="w-8 h-8 mx-auto mb-5">
        <span class="cursor-pointer hover:text-white px-2 block mb-5">
          <i class="fas fa-stream">
          </i>
        </span>
        <span class="cursor-pointer hover:text-white px-2 block mb-5">
          <i class="fas fa-search p-2 bg-gray-800 rounded-full">
          </i>
        </span>
        <span class="cursor-pointer hover:text-white px-2 block mb-5 relative">
          <i class="fas fa-bell">
          </i>
          <span
            class="absolute right-0 top-0 -mt-2 text-xs bg-red-500 text-white font-medium px-2 shadow-lg rounded-full border-2 border-gray-900">3</span>
        </span>
        <span class="cursor-pointer px-2 block mb-5 relative">
          <span
            class="absolute right-0 top-0 -mt-2 text-xs bg-red-500 text-white font-medium px-2 shadow-lg rounded-full border-2 border-gray-900">3</span>
          <img
            src="https://lh3.googleusercontent.com/-U0lTbxzh0bE/AAAAAAAAAAI/AAAAAAAAAAA/ACHi3rdJubMZweMDYD49ddsxq1wXai_9Cg/s48-c/photo.jpg"
            alt="alt placeholder" class="w-8 h-8 mx-auto mb-5 rounded-full">
        </span>
      </div>
    </div>
    <div class="p-4 w-64 bg-gray-800">
      <!--dark mode - wide side navigation-->
      <div class="w-full py-4 px-2 text-gray-700 bg-gray-900 rounded-lg text-left capitalize font-medium shadow-lg">
        <img src="https://www.freepnglogos.com/uploads/spotify-logo-png/file-spotify-logo-png-4.png"
          alt="alt placeholder" class="w-8 h-8 mx-auto mb-5 ">
        <span class="cursor-pointer px-2 py-1 hover:bg-gray-800 hover:text-gray-300 rounded block mb-5">
          <i class="w-8 fas fa-stream p-2 bg-gray-800 rounded-full">
          </i>
          <span class="mx-2">categories</span>
        </span>
        <span class="cursor-pointer px-2 py-1 hover:bg-gray-800 hover:text-gray-300 rounded block mb-5">
          <i class="w-8 fas fa-search p-2 bg-gray-800 rounded-full">
          </i>
          <span class="mx-2">search</span>
        </span>
        <span class="cursor-pointer px-2 py-1 hover:bg-gray-800 hover:text-gray-300 rounded block mb-5">
          <span class="w-8 mb-5 relative">
            <i class="w-8 fas fa-user p-2 bg-gray-800 rounded-full">
            </i>
            <span
              class="absolute right-0 top-0 -mt-2 -mr-1 text-xs bg-yellow-500 text-black font-medium px-2 rounded-full">3</span>
          </span>
          <span class="mx-2">sign ups</span>
        </span>
        <span class="cursor-pointer px-2 py-1 hover:bg-gray-800 hover:text-gray-300 rounded block mb-5">
          <i class="w-8 fas fa-th p-2 bg-gray-800 rounded-full">
          </i>
          <span class="mx-2">menu</span>
        </span>
        <span class="cursor-pointer px-2 py-1 hover:bg-gray-800 hover:text-gray-300 rounded block mb-5">
          <i class="w-8 fas fa-calendar-alt p-2 bg-gray-800 rounded-full">
          </i>
          <span class="mx-2">calendar</span>
        </span>
      </div>
    </div>
    <div class="p-4 w-64 ">
      <!--light mode - wide side navigation-->
      <div class="w-full py-4 px-2 text-gray-900 bg-white rounded-lg text-left capitalize font-medium shadow-lg">
        <img src="https://www.freepnglogos.com/uploads/spotify-logo-png/file-spotify-logo-png-4.png"
          alt="alt placeholder" class="w-8 h-8 mx-auto mb-5 ">
        <span class="cursor-pointer px-2 py-1 hover:bg-gray-200 hover:text-gray-700 rounded block mb-5">
          <i class="w-8 fas fa-stream p-2 bg-gray-200 rounded-full">
          </i>
          <span class="mx-2">categories</span>
        </span>
        <span class="cursor-pointer px-2 py-1 hover:bg-gray-200 hover:text-gray-700 rounded block mb-5">
          <i class="w-8 fas fa-search p-2 bg-gray-200 rounded-full">
          </i>
          <span class="mx-2">search</span>
        </span>
        <span class="cursor-pointer px-2 py-1 hover:bg-gray-200 hover:text-gray-700 rounded block mb-5">
          <span class="w-8 mb-5 relative">
            <i class="w-8 fas fa-user p-2 bg-gray-200 rounded-full">
            </i>
            <span
              class="absolute right-0 top-0 -mt-2 -mr-1 text-xs bg-yellow-500 text-black font-medium px-2 rounded-full">3</span>
          </span>
          <span class="mx-2">sign ups</span>
        </span>
        <span class="cursor-pointer px-2 py-1 hover:bg-gray-200 hover:text-gray-700 rounded block mb-5">
          <i class="w-8 fas fa-th p-2 bg-gray-200 rounded-full">
          </i>
          <span class="mx-2">menu</span>
        </span>
        <span class="cursor-pointer px-2 py-1 hover:bg-gray-200 hover:text-gray-700 rounded block mb-5">
          <i class="w-8 fas fa-calendar-alt p-2 bg-gray-200 rounded-full">
          </i>
          <span class="mx-2">calendar</span>
        </span>
      </div>
    </div>
    <div class="p-4 w-24 ">
      <!--light mode - tight side navigation with red notification-->
      <div class="py-4 px-2 text-gray-900 bg-white rounded text-center shadow-lg ">
        <img src="https://www.freepnglogos.com/uploads/spotify-logo-png/file-spotify-logo-png-4.png"
          alt="alt placeholder" class="w-8 h-8 mx-auto mb-5">
        <span class="cursor-pointer hover:text-gray-500 px-2 block mb-5">
          <i class="fas fa-stream">
          </i>
        </span>
        <span class="cursor-pointer hover:text-gray-500 px-2 block mb-5">
          <i class="fas fa-search p-2 bg-gray-200 rounded-full">
          </i>
        </span>
        <span class="cursor-pointer hover:text-gray-500 px-2 block mb-5 relative">
          <i class="fas fa-bell">
          </i>
          <span
            class="absolute right-0 top-0 -mt-2 text-xs bg-red-500 text-white font-medium px-2 shadow-lg rounded-full border-2 border-white">3</span>
        </span>
        <span class="cursor-pointer hover:text-gray-500 px-2 block mb-5 relative">
          <img
            src="https://lh3.googleusercontent.com/-U0lTbxzh0bE/AAAAAAAAAAI/AAAAAAAAAAA/ACHi3rdJubMZweMDYD49ddsxq1wXai_9Cg/s48-c/photo.jpg"
            alt="alt placeholder" class="w-8 h-8 mx-auto mb-5 rounded-full">
          <span
            class="absolute right-0 top-0 -mt-2 text-xs bg-red-500 text-white font-medium px-2 shadow-lg rounded-full border-2 border-white ">3</span>
        </span>
      </div>
    </div>
    <div class="p-4 w-24 ">
      <!--light mode - tight side navigation with yellow notification-->
      <div class="py-4 px-2 bg-white text-gray-900 rounded-lg text-center shadow-lg">
        <img src="https://www.freepnglogos.com/uploads/spotify-logo-png/file-spotify-logo-png-4.png"
          alt="alt placeholder" class="w-8 h-8 mx-auto mb-5">
        <span class="cursor-pointer hover:text-gray-500 px-2 block mb-5">
          <i class="fas fa-stream">
          </i>
        </span>
        <span class="cursor-pointer hover:text-gray-500 px-2 block mb-5">
          <i class="fas fa-search p-2 bg-gray-200 rounded-full">
          </i>
        </span>
        <span class="cursor-pointer hover:text-gray-500 px-2 block mb-5 relative">
          <i class="fas fa-users">
          </i>
          <span
            class="absolute right-0 top-0 -mt-2 text-xs bg-yellow-500 text-black font-medium px-2 shadow-lg rounded-full border-2 border-white">3</span>
        </span>
        <span class="cursor-pointer hover:text-gray-500 px-2 block mb-5">
          <i class="fas fa-calendar-alt">
          </i>
        </span>
      </div>
    </div>
  </div>
</div>

How to make a Dark Mode vs Light Mode Navigation with Tailwind CSS?

Install tailwind css of verion 1.0.4

Use the link html tag to import the stylesheet of Tailwind CSS of the version 1.0.4

<link href=https://unpkg.com/[email protected]/dist/tailwind.min.css rel="stylesheet">

All the unility class needed to make a Dark Mode vs Light Mode Navigation component

  • bg-gray-200
  • p-10
  • flex
  • flex-wrap
  • p-4
  • w-full
  • w-1/3
  • py-4
  • px-6
  • mx-auto
  • px-2
  • mx-2
  • inline-block
  • block
  • text-xl
  • mt-3
  • w-12
  • h-12
  • mt-1
  • text-gray-700
  • text-center
  • p-2
  • w-5
  • w-3/5
  • pb-0
  • lg:w-1/2
  • bg-gray-800
  • bg-gray-900
  • mr-2
  • border-r
  • border-gray-800
  • w-8
  • h-8
  • -mt-1
  • inline
  • px-1
  • hover:text-white
  • relative
  • absolute
  • right-0
  • top-0
  • -mt-2
  • -mr-1
  • text-xs
  • bg-red-500
  • text-white
  • w-10
  • float-right
  • mr-3
  • bg-yellow-500
  • text-black
  • text-gray-900
  • bg-white
  • hover:text-gray-700
  • py-1
  • hover:bg-gray-800
  • hover:text-gray-300
  • text-sm
  • mb-5
  • mx-1
  • hover:bg-gray-200
  • pt-0
  • w-24
  • border-2
  • border-gray-900
  • w-64
  • text-left
  • hover:text-gray-500
  • border-white

69 steps to make a Dark Mode vs Light Mode Navigation component with Tailwind CSS

  1. Control the background color of an element to gray-200 using the bg-gray-200 utilities.

  2. Control the padding on all sides of an element to 2.5rem using the p-10 utilities.

  3. Use flex to create a block-level flex container.

  4. Use flex to create a block-level flex container.

  5. Control the padding on all sides of an element to 1rem using the p-4 utilities.

  6. Use w-full to set an element to a 100% based width.

  7. Use w-1/3 to set an element to a fixed width(1/3).

  8. Control the vertical padding of an element to 1rem using the py-4 utilities.

  9. Control the horizontal padding of an element to 1.5rem using the px-6 utilities.

  10. Control the horizontal margin of an element to auto using the mx-auto utilities.

  11. Control the horizontal padding of an element to 0.5rem using the px-2 utilities.

  12. Control the horizontal margin of an element to 0.5rem using the mx-2 utilities.

  13. Use inline-block utilities to wrap the element to prevent the text inside from extending beyond its parent.

  14. Use inline utilities to put the element on its own line and fill its parent.

  15. Control the text color of an element to xl using the text-xl utilities.

  16. Control the margin on top side of an element to 0.75rem using the mt-3 utilities.

  17. Use w-12 to set an element to a fixed width(3rem).

  18. Use h-12 to set an element to a fixed height(3rem).

  19. Control the margin on top side of an element to 0.25rem using the mt-1 utilities.

  20. Control the text color of an element to gray-700 using the text-gray-700 utilities.

  21. Control the text color of an element to center using the text-center utilities.

  22. Control the padding on all sides of an element to 0.5rem using the p-2 utilities.

  23. Use w-5 to set an element to a fixed width(1.25rem).

  24. Use w-3/5 to set an element to a fixed width(3/5).

  25. Control the padding on bottom side of an element to 0rem using the pb-0 utilities.

  26. Use lg:w-1/2 to set an element to a fixed width(1/2) at only large screen sizes.

  27. Control the background color of an element to gray-800 using the bg-gray-800 utilities.

  28. Control the background color of an element to gray-900 using the bg-gray-900 utilities.

  29. Control the margin on right side of an element to 0.5rem using the mr-2 utilities.

  30. Control the border color of an element to r using the border-r utilities.

  31. Control the border color of an element to gray-800 using the border-gray-800 utilities.

  32. Use w-8 to set an element to a fixed width(2rem).

  33. Use h-8 to set an element to a fixed height(2rem).

  34. Control the margin on top side of an element to -0.25rem using the -mt-1 utilities.

  35. Use inline utilities to control the flow of text inside the element to wrap normally.

  36. Control the horizontal padding of an element to 0.25rem using the px-1 utilities.

  37. Control the text color of an element to white on hover using the hover:text-white utilities.

  38. Use relative to position an element according to the normal flow of the document.

  39. Use absolute to position an element outside of the normal flow of the document, causing neighboring elements to act as if the element doesn’t exist.

  40. Use the right-0 utilities to set the right position of a positioned element to 0rem.

  41. Use the top-0 utilities to set the top position of a positioned element to 0rem.

  42. Control the margin on top side of an element to -0.5rem using the -mt-2 utilities.

  43. Control the margin on right side of an element to -0.25rem using the -mr-1 utilities.

  44. Control the text color of an element to xs using the text-xs utilities.

  45. Control the background color of an element to red-500 using the bg-red-500 utilities.

  46. Control the text color of an element to white using the text-white utilities.

  47. Use w-10 to set an element to a fixed width(2.5rem).

  48. Use float-right to float an element to the right of its container.

  49. Control the margin on right side of an element to 0.75rem using the mr-3 utilities.

  50. Control the background color of an element to yellow-500 using the bg-yellow-500 utilities.

  51. Control the text color of an element to black using the text-black utilities.

  52. Control the text color of an element to gray-900 using the text-gray-900 utilities.

  53. Control the background color of an element to white using the bg-white utilities.

  54. Control the text color of an element to gray-700 on hover using the hover:text-gray-700 utilities.

  55. Control the vertical padding of an element to 0.25rem using the py-1 utilities.

  56. Control the background color of an element to gray-800 using the hover:bg-gray-800 utilities on hover.

  57. Control the text color of an element to gray-300 on hover using the hover:text-gray-300 utilities.

  58. Control the text color of an element to sm using the text-sm utilities.

  59. Control the margin on bottom side of an element to 1.25rem using the mb-5 utilities.

  60. Control the horizontal margin of an element to 0.25rem using the mx-1 utilities.

  61. Control the background color of an element to gray-200 using the hover:bg-gray-200 utilities on hover.

  62. Control the padding on top side of an element to 0rem using the pt-0 utilities.

  63. Use w-24 to set an element to a fixed width(6rem).

  64. Control the border color of an element to 0.5rem using the border-2 utilities.

  65. Control the border color of an element to gray-900 using the border-gray-900 utilities.

  66. Use w-64 to set an element to a fixed width(16rem).

  67. Control the text color of an element to left using the text-left utilities.

  68. Control the text color of an element to gray-500 on hover using the hover:text-gray-500 utilities.

  69. Control the border color of an element to white using the border-white utilities.

Conclusion

The above is a step-by-step tutorial on how to use Tailwind CSS to make a Dark Mode vs Light Mode Navigation components, learn and follow along to implement your own components.