Published on

The Ninja Guide To How To Make A Horizontal Admin Dashboard With Tailwind CSS Better

Horizontal Admin Dashboard

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 Horizontal Admin Dashboard ui component

Alpine js, chart js

Why use Tailwind CSS to create a Horizontal Admin Dashboard ui component?

  • It can make the building process of Horizontal Admin Dashboard ui component faster and more easily.
  • Enables building complex responsive layouts and components freely.
  • Minimum lines of CSS code in Horizontal Admin Dashboard component file.

The preview of Horizontal Admin Dashboard ui component

Free download of the Horizontal Admin Dashboard's source code

The source code of Horizontal Admin Dashboard ui component

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Dashboard ATOM</title>
    <link href="https://unpkg.com/[email protected]^2/dist/tailwind.min.css" rel="stylesheet">
    <script defer src="https://unpkg.com/[email protected]/dist/cdn.min.js"></script>
    <style>
        [x-cloak] {
            display: none !important;
        }
    </style>
</head>

<body class="relative antialiased bg-gray-100">
    <!-- Start Nav -->
    <div class="fixed bottom-4 right-4 xl:right-20">
        <a href="https://www.buymeacoffee.com/ejulfaey" target="_blank"
            class="transform duration-500 ease-in-out animate-bounce bg-yellow-400 px-4 py-3 font-mono font-semibold rounded-lg shadow hover:shadow-xl flex justify-between items-center gap-4">
            <img class="w-8 h-8 rounded"
                src="https://img.buymeacoffee.com/api/?name=Ejul&size=300&bg-image=bmc&background=5F7FFF"
                alt="buymeacoffee">
            Buy Me A Coffee
        </a>
    </div>
    <nav class="p-4 md:py-8 xl:px-0 md:container md:mx-w-6xl md:mx-auto">
        <div class="hidden lg:flex lg:justify-between lg:items-center">
            <a href="#" class="flex items-start gap-2 group">
                <div class="bg-blue-600 text-white p-2 rounded-md group-hover:bg-blue-800">
                    <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24"
                        stroke="currentColor">
                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                            d="M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" />
                    </svg>
                </div>
                <p class="text-sm font-light uppercase">
                    Dashboard
                    <span class="text-base block font-bold tracking-widest">
                        Atom
                    </span>
                </p>
            </a>
            <ul class="flex items-center space-x-4 text-sm font-semibold">
                <li><a href="#" class="px-2 xl:px-4 py-2 text-gray-800 rounded-md hover:bg-gray-200">My Account</a></li>
                <li class="relative" x-data="{ open: false }">
                    <a x-on:click="open = !open" x-on:click.outside="open = false" href="#"
                        class="px-2 xl:px-4 py-2 text-gray-600 rounded-md hover:bg-gray-200 flex gap-2 items-center">
                        Transactions
                        <svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4 stroke-current stroke-2 text-gray-800 transform duration-500 ease-in-out" :class="open ? 'rotate-90' : ''"  fill="none" viewBox="0 0 24 24"
                            stroke="currentColor">
                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7" />
                        </svg> </a>
                    <ul x-cloak x-show="open" x-transition
                        class="absolute top-10 left-0 bg-white p-4 rounded-md shadow overflow-hidden w-64">
                        <li>
                            <a href="#"
                                class="p-4 block text-sm text-gray-600 rounded flex items-center gap-2 hover:bg-gray-100">
                                <svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4" fill="none" viewBox="0 0 24 24"
                                    stroke="currentColor">
                                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                                        d="M9 5l7 7-7 7" />
                                </svg>
                                Transaction ABC
                            </a>
                        </li>
                        <li>
                            <a href="#"
                                class="p-4 block text-sm text-gray-600 rounded flex items-center gap-2 hover:bg-gray-100">
                                <svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4" fill="none" viewBox="0 0 24 24"
                                    stroke="currentColor">
                                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                                        d="M9 5l7 7-7 7" />
                                </svg>
                                Transaction DEF
                            </a>
                        </li>
                        <li>
                            <a href="#"
                                class="p-4 block text-sm text-gray-600 rounded flex items-center gap-2 hover:bg-gray-100">
                                <svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4" fill="none" viewBox="0 0 24 24"
                                    stroke="currentColor">
                                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                                        d="M9 5l7 7-7 7" />
                                </svg>
                                Transaction GHI
                            </a>
                        </li>
                    </ul>
                </li>
                <li><a href="#" class="px-2 xl:px-4 py-2 text-gray-600 rounded-md hover:bg-gray-200">Cards </a></li>
                <li><a href="#" class="px-2 xl:px-4 py-2 text-gray-600 rounded-md hover:bg-gray-200">Offers</a></li>
            </ul>
            <ul class="flex space-x-2 xl:space-x-4 text-sm font-semibold">
                <li>
                    <a href="#">
                        <div class="p-2 rounded hover:bg-gray-200">
                            <svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4 stroke-current text-gray-800"
                                fill="none" viewBox="0 0 24 24" stroke="currentColor">
                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                                    d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" />
                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                                    d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
                            </svg>
                        </div>
                    </a>
                </li>
                <li>
                    <a href="#">
                        <div class="p-2 rounded hover:bg-gray-200">
                            <svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4 stroke-current text-gray-800"
                                fill="none" viewBox="0 0 24 24" stroke="currentColor">
                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                                    d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" />
                            </svg>
                        </div>
                    </a>
                </li>
                <li>
                    <a href="#">
                        <div class="p-2 rounded hover:bg-gray-200">
                            <svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4 stroke-current text-gray-800"
                                fill="none" viewBox="0 0 24 24" stroke="currentColor">
                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                                    d="M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9" />
                            </svg>
                        </div>
                    </a>
                </li>
            </ul>
            <ul class="flex items-center gap-6">
                <li>
                    <a href="#" class="text-sm font-sans text-gray-800 font-semibold tracking-wider">
                        Derol Hakim
                    </a>
                </li>
                <li>
                    <a href="#">
                        <div class="p-2 rounded hover:bg-gray-200">
                            <svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 stroke-current text-gray-800"
                                fill="none" viewBox="0 0 24 24" stroke="currentColor">
                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                                    d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1" />
                            </svg>
                        </div>
                    </a>
                </li>
            </ul>
        </div>
        <div x-data="{ open: false }" class="lg:hidden relative flex justify-between w-full">
            <a href="#" class="flex items-start gap-2 group">
                <div class="bg-blue-600 text-white p-3 rounded-md group-hover:bg-blue-800">
                    <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24"
                        stroke="currentColor">
                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                            d="M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" />
                    </svg>
                </div>
                <p class="text-sm font-light uppercase">
                    Dashboard
                    <span class="text-base block font-bold tracking-widest">
                        Atom
                    </span>
                </p>
            </a>
            <button x-on:click="open = !open" type="button" class="bg-gray-200 p-3 rounded-md">
                <svg x-show="!open" xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24"
                    stroke="currentColor">
                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h7" />
                </svg>
                <svg x-show="open" xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24"
                    stroke="currentColor">
                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
                </svg>
            </button>
            <div x-show="open" x-transition class="absolute top-14 left-0 right-0 w-full bg-white rounded-md border">
                <ul class="p-4">
                    <li class="px-4 py-2 rounded hover:bg-gray-200">
                        <a href="#" class="flex items-center gap-4">
                            <svg xmlns="http://www.w3.org/2000/svg" class="w-3 h-3" fill="none" viewBox="0 0 24 24"
                                stroke="currentColor">
                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                                    d="M9 5l7 7-7 7" />
                            </svg>
                            My Account
                        </a>
                    </li>
                    <li class="px-4 py-2 rounded hover:bg-gray-200">
                        <a href="#" class="flex items-center gap-4">
                            <svg xmlns="http://www.w3.org/2000/svg" class="w-3 h-3" fill="none" viewBox="0 0 24 24"
                                stroke="currentColor">
                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                                    d="M9 5l7 7-7 7" />
                            </svg>
                            Transactions
                        </a>
                    </li>
                    <li class="px-4 py-2 rounded hover:bg-gray-200">
                        <a href="#" class="flex items-center gap-4">
                            <svg xmlns="http://www.w3.org/2000/svg" class="w-3 h-3" fill="none" viewBox="0 0 24 24"
                                stroke="currentColor">
                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                                    d="M9 5l7 7-7 7" />
                            </svg>
                            Cards
                        </a>
                    </li>
                    <li class="px-4 py-2 rounded hover:bg-gray-200">
                        <a href="#" class="flex items-center gap-4">
                            <svg xmlns="http://www.w3.org/2000/svg" class="w-3 h-3" fill="none" viewBox="0 0 24 24"
                                stroke="currentColor">
                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                                    d="M9 5l7 7-7 7" />
                            </svg>
                            Offers
                        </a>
                    </li>
                </ul>

            </div>
        </div>
    </nav>
    <!-- End Nav -->
    <!-- Start Main -->
    <main class="container mx-w-6xl mx-auto py-4">
        <div class="flex flex-col space-y-8">
            <!-- First Row -->
            <div class="grid grid-cols-1 md:grid-cols-4 xl:grid-cols-5 px-4 xl:p-0 gap-y-4 md:gap-6">
                <div class="md:col-span-2 xl:col-span-3 bg-white p-6 rounded-2xl border border-gray-50">
                    <div class="flex flex-col space-y-6 md:h-full md:justify-between">
                        <div class="flex justify-between">
                            <span class="text-xs text-gray-500 font-semibold uppercase tracking-wider">
                                Main Account
                            </span>
                            <span class="text-xs text-gray-500 font-semibold uppercase tracking-wider">
                                Available Funds
                            </span>
                        </div>
                        <div class="flex gap-2 md:gap-4 justify-between items-center">
                            <div class="flex flex-col space-y-4">
                                <h2 class="text-gray-800 font-bold tracking-widest leading-tight">Derol's Savings
                                    Account</h2>
                                <div class="flex items-center gap-4">
                                    <p class="text-lg text-gray-600 tracking-wider">**** **** *321</p>
                                    <svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4" fill="none"
                                        viewBox="0 0 24 24" stroke="currentColor">
                                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                                            d="M17 8l4 4m0 0l-4 4m4-4H3" />
                                    </svg>
                                </div>
                            </div>
                            <h2 class="text-lg md:text-xl xl:text-3xl text-gray-700 font-black tracking-wider">
                                <span class="md:text-xl">$</span>
                                92,817.45
                            </h2>
                        </div>
                        <div class="flex gap-2 md:gap-4">
                            <a href="#"
                                class="bg-blue-600 px-5 py-3 w-full text-center md:w-auto rounded-lg text-white text-xs tracking-wider font-semibold hover:bg-blue-800">
                                Transfer Money
                            </a>
                            <a href="#"
                                class="bg-blue-50 px-5 py-3 w-full text-center md:w-auto rounded-lg text-blue-600 text-xs tracking-wider font-semibold hover:bg-blue-600 hover:text-white">
                                Link Account
                            </a>
                        </div>
                    </div>
                </div>
                <div
                    class="col-span-2 p-6 rounded-2xl bg-gradient-to-r from-blue-500 to-blue-800 flex flex-col justify-between">
                    <div class="flex flex-col">
                        <p class="text-white font-bold">Lorem ipsum dolor sit amet</p>
                        <p class="mt-1 text-xs md:text-sm text-gray-50 font-light leading-tight max-w-sm">
                            Lorem ipsum dolor sit amet consectetur adipisicing elit. Odio soluta saepe consequuntur
                            facilis ab a. Molestiae ad saepe assumenda praesentium rem dolore? Exercitationem, neque
                            obcaecati?
                        </p>
                    </div>
                    <div class="flex justify-between items-end">
                        <a href="#"
                            class="bg-blue-800 px-4 py-3 rounded-lg text-white text-xs tracking-wider font-semibold hover:bg-blue-600 hover:text-white">
                            Learn More
                        </a>
                        <img src="https://atom.dzulfarizan.com/assets/calendar.png" alt="calendar" class="w-auto h-24 object-cover">
                    </div>
                </div>

            </div>
            <!-- End First Row -->
            <!-- Start Second Row -->
            <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 px-4 xl:p-0 gap-4 xl:gap-6">
                <div class="col-span-1 md:col-span-2 lg:col-span-4 flex justify-between">
                    <h2 class="text-xs md:text-sm text-gray-700 font-bold tracking-wide md:tracking-wider">
                        Expenses By Category</h2>
                    <a href="#" class="text-xs text-gray-800 font-semibold uppercase">More</a>
                </div>
                <div class="bg-white p-6 rounded-xl border border-gray-50">
                    <div class="flex justify-between items-start">
                        <div class="flex flex-col">
                            <p class="text-xs text-gray-600 tracking-wide">Foods & Beverages</p>
                            <h3 class="mt-1 text-lg text-blue-500 font-bold">$ 818</h3>
                            <span class="mt-4 text-xs text-gray-500">Last Transaction 3 Hours ago</span>
                        </div>
                        <div class="bg-blue-500 p-2 md:p-1 xl:p-2 rounded-md">
                            <img src="https://atom.dzulfarizan.com/assets/dish-2.png" alt="icon" class="w-auto h-8 md:h-6 xl:h-8 object-cover">
                        </div>
                    </div>
                </div>
                <div class="bg-white p-6 rounded-xl border border-gray-50">
                    <div class="flex justify-between items-start">
                        <div class="flex flex-col">
                            <p class="text-xs text-gray-600 tracking-wide">Groceries</p>
                            <h3 class="mt-1 text-lg text-green-500 font-bold">$ 8,918</h3>
                            <span class="mt-4 text-xs text-gray-500">Last Transaction 3 Days ago</span>
                        </div>
                        <div class="bg-green-500 p-2 md:p-1 xl:p-2 rounded-md">
                            <img src="https://atom.dzulfarizan.com/assets/grocery.png" alt="icon" class="w-auto h-8 md:h-6 xl:h-8 object-cover">
                        </div>
                    </div>
                </div>
                <div class="bg-white p-6 rounded-xl border border-gray-50">
                    <div class="flex justify-between items-start">
                        <div class="flex flex-col">
                            <p class="text-xs text-gray-600 tracking-wide">Gaming</p>
                            <h3 class="mt-1 text-lg text-yellow-500 font-bold">$ 1,223</h3>
                            <span class="mt-4 text-xs text-gray-600">Last Transaction 4 Days ago</span>
                        </div>
                        <div class="bg-yellow-500 p-2 md:p-1 xl:p-2 rounded-md">
                            <img src="https://atom.dzulfarizan.com/assets/gaming.png" alt="icon" class="w-auto h-8 md:h-6 xl:h-8 object-cover">
                        </div>
                    </div>
                </div>
                <div class="bg-white p-6 rounded-xl border border-gray-50">
                    <div class="flex justify-between items-start">
                        <div class="flex flex-col">
                            <p class="text-xs text-gray-600 tracking-wide">Trip & Holiday</p>
                            <h3 class="mt-1 text-lg text-indigo-500 font-bold">$ 5,918</h3>
                            <span class="mt-4 text-xs text-gray-500">Last Transaction 1 Month ago</span>
                        </div>
                        <div class="bg-indigo-500 p-2 md:p-1 xl:p-2 rounded-md">
                            <img src="https://atom.dzulfarizan.com/assets/holiday.png" alt="icon" class="w-auto h-8 md:h-6 xl:h-8 object-cover">
                        </div>
                    </div>
                </div>
            </div>
            <!-- End Second Row -->
            <!-- Start Third Row -->
            <div class="grid grid-cols-1 md:grid-cols-5 items-start px-4 xl:p-0 gap-y-4 md:gap-6">
                <div class="col-start-1 col-end-5">
                    <h2 class="text-xs md:text-sm text-gray-800 font-bold tracking-wide">Summary Transactions</h2>
                </div>
                <div class="col-span-2 bg-white p-6 rounded-xl border border-gray-50 flex flex-col space-y-6">
                    <div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 flex justify-between items-center">
                        <div class="p-4 cursor-pointer border">
                            <span class="text-xs text-gray-500 font-semibold">Daily</span>
                            <h2 class="text-gray-800 font-bold tracking-wider">$ 27.80</h2>
                        </div>
                        <div class="p-4 cursor-pointer border">
                            <span class="text-xs text-gray-500 font-semibold">Weekly</span>
                            <h2 class="text-gray-800 font-bold tracking-wider">$ 192.92</h2>
                        </div>
                        <div class="p-4 cursor-pointer border">
                            <span class="text-xs text-gray-500 font-semibold">Monthly</span>
                            <h2 class="text-gray-800 font-bold tracking-wider">$ 501.10</h2>
                        </div>
                    </div>
                    <canvas id="myChart"></canvas>
                </div>
                <div class="col-span-3 bg-white p-6 rounded-xl border border-gray-50 flex flex-col space-y-6">
                    <div class="flex justify-between items-center">
                        <h2 class="text-sm text-gray-600 font-bold tracking-wide">Latest Transactions</h2>
                        <a href="#"
                            class="px-4 py-2 text-xs bg-blue-100 text-blue-500 rounded uppercase tracking-wider font-semibold hover:bg-blue-300">More</a>
                    </div>
                    <ul class="divide-y-2 divide-gray-100 overflow-x-auto w-full">
                        <li class="py-3 flex justify-between text-sm text-gray-500 font-semibold">
                            <p class="px-4 font-semibold">Today</p>
                            <p class="px-4 text-gray-600">McDonald</p>
                            <p class="px-4 tracking-wider">Cash</p>
                            <p class="px-4 text-blue-600">Food</p>
                            <p class="md:text-base text-gray-800 flex items-center gap-2">
                                16.90
                                <svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4" fill="none" viewBox="0 0 24 24"
                                    stroke="currentColor">
                                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                                        d="M19 9l-7 7-7-7" />
                                </svg>
                            </p>
                        </li>
                        <li class="py-3 flex justify-between text-sm text-gray-500 font-semibold">
                            <p class="px-4 font-semibold">Today</p>
                            <p class="px-4 text-gray-600">McDonald</p>
                            <p class="px-4 tracking-wider">Cash</p>
                            <p class="px-4 text-blue-600">Food</p>
                            <p class="md:text-base text-gray-800 flex items-center gap-2">
                                16.90
                                <svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4" fill="none" viewBox="0 0 24 24"
                                    stroke="currentColor">
                                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                                        d="M19 9l-7 7-7-7" />
                                </svg>
                            </p>
                        </li>
                        <li class="py-3 flex justify-between text-sm text-gray-500 font-semibold">
                            <p class="px-4 font-semibold">Today</p>
                            <p class="px-4 text-gray-600">McDonald</p>
                            <p class="px-4 tracking-wider">Cash</p>
                            <p class="px-4 text-blue-600">Food</p>
                            <p class="md:text-base text-gray-800 flex items-center gap-2">
                                16.90
                                <svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4" fill="none" viewBox="0 0 24 24"
                                    stroke="currentColor">
                                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                                        d="M19 9l-7 7-7-7" />
                                </svg>
                            </p>
                        </li>
                        <li class="py-3 flex justify-between text-sm text-gray-500 font-semibold">
                            <p class="px-4 font-semibold">Today</p>
                            <p class="px-4 text-gray-600">McDonald</p>
                            <p class="px-4 tracking-wider">Cash</p>
                            <p class="px-4 text-blue-600">Food</p>
                            <p class="md:text-base text-gray-800 flex items-center gap-2">
                                16.90
                                <svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4" fill="none" viewBox="0 0 24 24"
                                    stroke="currentColor">
                                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                                        d="M19 9l-7 7-7-7" />
                                </svg>
                            </p>
                        </li>
                        <li class="py-3 flex justify-between text-sm text-gray-500 font-semibold">
                            <p class="px-4 font-semibold">Today</p>
                            <p class="px-4 text-gray-600">McDonald</p>
                            <p class="px-4 tracking-wider">Cash</p>
                            <p class="px-4 text-blue-600">Food</p>
                            <p class="md:text-base text-gray-800 flex items-center gap-2">
                                16.90
                                <svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4" fill="none" viewBox="0 0 24 24"
                                    stroke="currentColor">
                                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                                        d="M19 9l-7 7-7-7" />
                                </svg>
                            </p>
                        </li>
                        <li class="py-3 flex justify-between text-sm text-gray-500 font-semibold">
                            <p class="px-4 font-semibold">Today</p>
                            <p class="px-4 text-gray-600">McDonald</p>
                            <p class="px-4 tracking-wider">Cash</p>
                            <p class="px-4 text-blue-600">Food</p>
                            <p class="md:text-base text-gray-800 flex items-center gap-2">
                                16.90
                                <svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4" fill="none" viewBox="0 0 24 24"
                                    stroke="currentColor">
                                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                                        d="M19 9l-7 7-7-7" />
                                </svg>
                            </p>
                        </li>
                    </ul>
                </div>
            </div>
            <!-- End Third Row -->
        </div>
    </main>
    <!-- End Main -->
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/chart.min.js"></script>
    <script>
        const ctx = document.getElementById('myChart').getContext('2d');

        const data = {
            labels: [
                'Food & beverages',
                'Groceries',
                'Gaming',
                'Trip & holiday',
            ],
            datasets: [{
                label: 'Total Expenses',
                data: [148, 150, 130, 170],
                backgroundColor: [
                    '#3B82F6',
                    '#10B981',
                    '#6366F1',
                    '#F59E0B'
                ]
            }]
        };

        const config = {
            type: 'polarArea',
            data: data,
            options: {
                plugins: {
                    legend: {
                        position: 'bottom',
                    },
                }
            }
        };

        const chart = new Chart(ctx, config);
    </script>

</body>

</html>

How to create a Horizontal Admin Dashboard with Tailwind CSS?

Install tailwind css of verion 2.2.4

Use the script html tag to import the script of Tailwind CSS of the version 2.2.4

<script src="https://cdn.tailwindcss.com"></script>

All the unility class needed to create a Horizontal Admin Dashboard component

  • relative
  • bg-gray-100
  • fixed
  • bottom-4
  • right-4
  • xl:right-20
  • bg-yellow-400
  • px-4
  • py-3
  • flex
  • gap-4
  • w-8
  • h-8
  • p-4
  • md:py-8
  • xl:px-0
  • md:mx-w-6xl
  • md:mx-auto
  • hidden
  • lg:flex
  • gap-2
  • bg-blue-600
  • text-white
  • p-2
  • group-hover:bg-blue-800
  • h-6
  • w-6
  • text-sm
  • text-base
  • block
  • px-2
  • xl:px-4
  • py-2
  • text-gray-800
  • hover:bg-gray-200
  • text-gray-600
  • w-4
  • h-4
  • absolute
  • top-10
  • left-0
  • bg-white
  • overflow-hidden
  • w-64
  • hover:bg-gray-100
  • gap-6
  • w-5
  • h-5
  • lg:hidden
  • w-full
  • p-3
  • bg-gray-200
  • top-14
  • right-0
  • w-3
  • h-3
  • mx-w-6xl
  • mx-auto
  • py-4
  • flex-col
  • grid
  • grid-cols-1
  • md:grid-cols-4
  • xl:grid-cols-5
  • xl:p-0
  • gap-y-4
  • md:gap-6
  • p-6
  • border-gray-50
  • md:h-full
  • text-xs
  • text-gray-500
  • md:gap-4
  • text-lg
  • md:text-xl
  • xl:text-3xl
  • text-gray-700
  • px-5
  • text-center
  • md:w-auto
  • hover:bg-blue-800
  • bg-blue-50
  • text-blue-600
  • hover:bg-blue-600
  • hover:text-white
  • bg-gradient-to-r
  • mt-1
  • md:text-sm
  • text-gray-50
  • max-w-sm
  • bg-blue-800
  • w-auto
  • h-24
  • md:grid-cols-2
  • lg:grid-cols-4
  • xl:gap-6
  • text-blue-500
  • mt-4
  • bg-blue-500
  • md:p-1
  • xl:p-2
  • md:h-6
  • xl:h-8
  • text-green-500
  • bg-green-500
  • text-yellow-500
  • bg-yellow-500
  • text-indigo-500
  • bg-indigo-500
  • md:grid-cols-5
  • xl:grid-cols-3
  • bg-blue-100
  • hover:bg-blue-300
  • overflow-x-auto
  • md:text-base

115 steps to create a Horizontal Admin Dashboard component with Tailwind CSS

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

  2. Control the background color of an element to gray-100 using the bg-gray-100 utilities.

  3. Use fixed to position an element relative to the browser window.

  4. Use the bottom-4 utilities to set the bottom position of a positioned element to 1rem.

  5. Use the right-4 utilities to set the right position of a positioned element to 1rem.

  6. Use the xl:right-20 utilities to set the right position of a positioned element to 5rem at only extremely large screen sizes.

  7. Control the background color of an element to yellow-400 using the bg-yellow-400 utilities.

  8. Control the horizontal padding of an element to 1rem using the px-4 utilities.

  9. Control the vertical padding of an element to 0.75rem using the py-3 utilities.

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

  11. To specify the width between columns, you can use the gap-4 utilities.

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

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

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

  15. Control the vertical padding of an element to 2rem at only medium screen sizes using the md:py-8 utilities.

  16. Control the horizontal padding of an element to 0rem at only extremely large screen sizes using the xl:px-0 utilities.

  17. Control the horizontal margin of an element to w-6xl at only medium screen sizes using the md:mx-w-6xl utilities.

  18. Control the horizontal margin of an element to auto at only medium screen sizes using the md:mx-auto utilities.

  19. Use hidden to set an element to display: none and remove it from the page layout.

  20. Use flex to create a block-level flex container at only large screen sizes.

  21. To specify the width between columns, you can use the gap-2 utilities.

  22. Control the background color of an element to blue-600 using the bg-blue-600 utilities.

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

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

  25. Control the background color of an element to blue-800 using the group-hover:bg-blue-800 utilitiesundefined.

  26. Use h-6 to set an element to a fixed height(1.5rem).

  27. Use w-6 to set an element to a fixed width(1.5rem).

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

  29. Control the text color of an element to base using the text-base utilities.

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

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

  32. Control the horizontal padding of an element to 1rem at only extremely large screen sizes using the xl:px-4 utilities.

  33. Control the vertical padding of an element to 0.5rem using the py-2 utilities.

  34. Control the text color of an element to gray-800 using the text-gray-800 utilities.

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

  36. Control the text color of an element to gray-600 using the text-gray-600 utilities.

  37. Use w-4 to set an element to a fixed width(1rem).

  38. Use h-4 to set an element to a fixed height(1rem).

  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 top-10 utilities to set the top position of a positioned element to 2.5rem.

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

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

  43. Use overflow-hidden to clip any content within an element that overflows the bounds of that element.

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

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

  46. To specify the width between columns, you can use the gap-6 utilities.

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

  48. Use h-5 to set an element to a fixed height(1.25rem).

  49. Use hidden to set an element to display: none and remove it from the page layout at only large screen sizes.

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

  51. Control the padding on all sides of an element to 0.75rem using the p-3 utilities.

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

  53. Use the top-14 utilities to set the top position of a positioned element to 3.5rem.

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

  55. Use w-3 to set an element to a fixed width(0.75rem).

  56. Use h-3 to set an element to a fixed height(0.75rem).

  57. Control the horizontal margin of an element to w-6xl using the mx-w-6xl utilities.

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

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

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

  61. Use grid to create a grid container.

  62. Use grid to create a grid container.

  63. Use grid to create a grid container at only medium screen sizes.

  64. Use grid to create a grid container at only extremely large screen sizes.

  65. Control the padding on all sides of an element to 0rem at only extremely large screen sizes using the xl:p-0 utilities.

  66. To specify the width between columns, you can use the gap-y-4 utilities.

  67. To specify the width between columns at only medium screen sizes, you can use the md:gap-6 utilities.

  68. Control the padding on all sides of an element to 1.5rem using the p-6 utilities.

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

  70. Use h-full to set an element’s height to 100% of its parent at only medium screen sizes, as long as the parent has a defined height.

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

  72. Control the text color of an element to gray-500 using the text-gray-500 utilities.

  73. To specify the width between columns at only medium screen sizes, you can use the md:gap-4 utilities.

  74. Control the text color of an element to lg using the text-lg utilities.

  75. Control the text color of an element to xl at only medium screen sizes using the md:text-xl utilities.

  76. Control the text color of an element to 3xl at only extremely large screen sizes using the xl:text-3xl utilities.

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

  78. Control the horizontal padding of an element to 1.25rem using the px-5 utilities.

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

  80. The w-auto utility can be useful if you need to remove an element’s assigned width under a specific condition, like at a particular breakpoint.

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

  82. Control the background color of an element to blue-50 using the bg-blue-50 utilities.

  83. Control the text color of an element to blue-600 using the text-blue-600 utilities.

  84. Control the background color of an element to blue-600 using the hover:bg-blue-600 utilities on hover.

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

  86. Control the background color of an element to gradient-to-r using the bg-gradient-to-r utilities.

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

  88. Control the text color of an element to sm at only medium screen sizes using the md:text-sm utilities.

  89. Control the text color of an element to gray-50 using the text-gray-50 utilities.

  90. Set the maximum width/height of an element using the max-w-sm utilities.

  91. Control the background color of an element to blue-800 using the bg-blue-800 utilities.

  92. The w-auto utility can be useful if you need to remove an element’s assigned width under a specific condition, like at a particular breakpoint.

  93. Use h-24 to set an element to a fixed height(6rem).

  94. Use grid to create a grid container at only medium screen sizes.

  95. Use grid to create a grid container at only large screen sizes.

  96. To specify the width between columns at only extremely large screen sizes, you can use the xl:gap-6 utilities.

  97. Control the text color of an element to blue-500 using the text-blue-500 utilities.

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

  99. Control the background color of an element to blue-500 using the bg-blue-500 utilities.

  100. Control the padding on all sides of an element to 0.25rem at only medium screen sizes using the md:p-1 utilities.

  101. Control the padding on all sides of an element to 0.5rem at only extremely large screen sizes using the xl:p-2 utilities.

  102. Use md:h-6 to set an element to a fixed height(1.5rem) at only medium screen sizes.

  103. Use xl:h-8 to set an element to a fixed height(2rem) at only extremely large screen sizes.

  104. Control the text color of an element to green-500 using the text-green-500 utilities.

  105. Control the background color of an element to green-500 using the bg-green-500 utilities.

  106. Control the text color of an element to yellow-500 using the text-yellow-500 utilities.

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

  108. Control the text color of an element to indigo-500 using the text-indigo-500 utilities.

  109. Control the background color of an element to indigo-500 using the bg-indigo-500 utilities.

  110. Use grid to create a grid container at only medium screen sizes.

  111. Use grid to create a grid container at only extremely large screen sizes.

  112. Control the background color of an element to blue-100 using the bg-blue-100 utilities.

  113. Control the background color of an element to blue-300 using the hover:bg-blue-300 utilities on hover.

  114. Use overflow-x-auto to allow horizontal scrolling if needed.

  115. Control the text color of an element to base at only medium screen sizes using the md:text-base utilities.

Conclusion

The above is a step-by-step tutorial on how to use Tailwind CSS to create a Horizontal Admin Dashboard components, learn and follow along to implement your own components.