Published on

6 Easy Ways To Create A Wireframe With Tailwind CSS Without Even Thinking About It

Tags
Wireframe

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 Wireframe ui component

Wireframe examples to help you create the ultimate web and mobile app designs. take a look and get inspired!

Why use Tailwind CSS to build a Wireframe ui component?

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

The preview of Wireframe ui component

Free download of the Wireframe's source code

The source code of Wireframe ui component

<header class="shadow-sm">
      <div class="bg-blue-300 py-1"></div>
        <nav class="flex items-center justify-between flex-wrap bg-white py-4 mx-auto px-8">
          <div class="flex items-center flex-shrink-0 text-white mr-6">
            <a class="text-white no-underline hover:text-white hover:no-underline pl-2" href="#">
              <div class="h-8 bg-gray-500 w-16 block mx-auto rounded-sm"></div>
            </a>
          </div>

          <div class="block lg:hidden">
            <button id="nav-toggle" class="focus:outline-none">
				<div class="h-1 bg-gray-300 w-8 mb-1 block mx-auto rounded-sm"></div>
				<div class="h-1 bg-gray-300 w-8 mb-1 block mx-auto rounded-sm"></div>
                <div class="h-1 bg-gray-300 w-8 mb-1 block mx-auto rounded-sm"></div>
            </button>
          </div>

          <div class="w-full flex-grow lg:flex lg:items-center lg:w-auto hidden lg:block pt-6 lg:pt-0" id="nav-content">
            <ul class="list-reset lg:flex justify-end flex-1 items-center">
              <li class="mr-3">
                <a class="inline-block py-2 px-4 active:text-gray-900 no-underline" href="#">
                  <div class="h-2 bg-gray-400 w-16 mt-2 block mx-auto rounded-sm"></div>
                </a>
              </li>
              <li class="mr-3">
                <a class="inline-block text-gray-600 no-underline hover:text-gray-200 hover:text-underline py-2 px-4" href="#">
                  <div class="h-2 bg-gray-400 w-16 mt-2 block mx-auto rounded-sm"></div>
                </a>
              </li>
              <li class="mr-3">
                <a class="inline-block text-gray-600 no-underline hover:text-gray-200 hover:text-underline py-2 px-4" href="#">
                  <div class="h-2 bg-gray-400 w-16 mt-2 block mx-auto rounded-sm"></div>
                </a>
              </li>
              <li class="mr-3">
                <a class="inline-block text-gray-600 no-underline hover:text-gray-200 hover:text-underline py-2 px-4" href="#">
                  <div class="h-2 bg-gray-400 w-16 mt-2 block mx-auto rounded-sm"></div>
                </a>
              </li>
            </ul>
          </div>
        </nav>
    </header>

    <main class="flex-grow flex justify-center items-center">

        <div class="mx-auto px-4 sm:px-8 py-2 text-center">

          <div class="text-center max-w-lg mx-auto mt-6">
            <div class="h-4 bg-gray-500 w-40 block mx-auto rounded-sm"></div>
            <div class="h-2 bg-gray-400 w-64 mt-4 block mx-auto rounded-sm"></div>
            <div class="h-2 bg-gray-400 w-48 mt-2 block mx-auto rounded-sm"></div>
          </div>

          <div class="grid grid-cols-6 gap-4 items-start mt-8 mx-auto px-8">

            <div class="col-span-6 sm:col-span-6 md:col-span-3 lg:col-span-2 xl:col-span-2">
              <div class="bg-white shadow-lg rounded-lg px-4 py-6 mx-4 my-4">
                <div class="mx-auto h-40 bg-gray-200 rounded-md"></div>
                <div class="h-4 bg-gray-200 w-40 mt-8 block mx-auto rounded-sm"></div>
                <div class="h-2 bg-gray-200 w-64 mt-2 block mx-auto rounded-sm"></div>
                <div class="flex justify-center mt-4">
                  <div class="rounded-sm h-8 w-20 px-4 bg-gray-200 mr-2"></div>
                  <div class="rounded-sm h-8 w-20 px-4 bg-green-300"></div>
                </div>
              </div>
            </div>


            <div class="col-span-6 sm:col-span-6 md:col-span-3 lg:col-span-2 xl:col-span-2">
              <div class="bg-white shadow-lg rounded-lg px-4 py-6 mx-4 my-4">
                <div class="mx-auto h-40 bg-gray-200 rounded-md"></div>
                <div class="h-4 bg-gray-200 w-40 mt-8 block mx-auto rounded-sm"></div>
                <div class="h-2 bg-gray-200 w-64 mt-2 block mx-auto rounded-sm"></div>
                <div class="flex justify-center mt-4">
                  <div class="rounded-sm h-8 w-20 px-4 bg-gray-200 mr-2"></div>
                  <div class="rounded-sm h-8 w-20 px-4 bg-green-300"></div>
                </div>
              </div>
            </div>

            <div class="col-span-6 sm:col-span-6 md:col-span-6 lg:col-span-2 xl:col-span-2">
              <div class="bg-white shadow-lg rounded-lg px-4 py-6 mx-4 my-4">
                <div class="mx-auto h-40 bg-gray-200 rounded-md"></div>
                <div class="h-4 bg-gray-200 w-40 mt-8 block mx-auto rounded-sm"></div>
                <div class="h-2 bg-gray-200 w-64 mt-2 block mx-auto rounded-sm"></div>
                <div class="flex justify-center mt-4">
                  <div class="rounded-sm h-8 w-20 px-4 bg-gray-200 mr-2"></div>
                  <div class="rounded-sm h-8 w-20 px-4 bg-green-300"></div>
                </div>
              </div>
            </div>

          </div>
        </div>

    </main>

How to build a Wireframe with Tailwind CSS?

Install tailwind css of verion 1.4.6

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

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

All the unility class needed to build a Wireframe component

  • bg-blue-300
  • py-1
  • flex
  • flex-wrap
  • bg-white
  • py-4
  • mx-auto
  • px-8
  • flex-shrink-0
  • text-white
  • mr-6
  • hover:text-white
  • pl-2
  • h-8
  • bg-gray-500
  • w-16
  • block
  • lg:hidden
  • h-1
  • bg-gray-300
  • w-8
  • mb-1
  • w-full
  • flex-grow
  • lg:flex
  • lg:w-auto
  • hidden
  • lg:block
  • pt-6
  • lg:pt-0
  • flex-1
  • mr-3
  • inline-block
  • py-2
  • px-4
  • active:text-gray-900
  • h-2
  • bg-gray-400
  • mt-2
  • text-gray-600
  • hover:text-gray-200
  • hover:text-underline
  • sm:px-8
  • text-center
  • max-w-lg
  • mt-6
  • h-4
  • w-40
  • w-64
  • mt-4
  • w-48
  • grid
  • grid-cols-6
  • gap-4
  • mt-8
  • py-6
  • mx-4
  • my-4
  • h-40
  • bg-gray-200
  • w-20
  • mr-2
  • bg-green-300

63 steps to build a Wireframe component with Tailwind CSS

  1. Control the background color of an element to blue-300 using the bg-blue-300 utilities.

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

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

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

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

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

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

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

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

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

  11. Control the margin on right side of an element to 1.5rem using the mr-6 utilities.

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

  13. Adjust the left padding of an element to 0.5rem using the pl-2 utilities class

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

  15. Control the background color of an element to gray-500 using the bg-gray-500 utilities.

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

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

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

  19. Use h-1 to set an element to a fixed height(0.25rem).

  20. Control the background color of an element to gray-300 using the bg-gray-300 utilities.

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

  22. Control the margin on bottom side of an element to 0.25rem using the mb-1 utilities.

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

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

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

  26. 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.

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

  28. Use inline utilities to put the element on its own line and fill its parent at only large screen sizes.

  29. Control the padding on top side of an element to 1.5rem using the pt-6 utilities.

  30. Control the padding on top side of an element to 0rem at only large screen sizes using the lg:pt-0 utilities.

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

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

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

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

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

  36. Control the text color of an element to gray-900 on active using the active:text-gray-900 utilities.

  37. Use h-2 to set an element to a fixed height(0.5rem).

  38. Control the background color of an element to gray-400 using the bg-gray-400 utilities.

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

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

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

  42. Control the text color of an element to underline on hover using the hover:text-underline utilities.

  43. Control the horizontal padding of an element to 2rem at only small screen sizes using the sm:px-8 utilities.

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

  45. Set the maximum width/height of an element using the max-w-lg utilities.

  46. Control the margin on top side of an element to 1.5rem using the mt-6 utilities.

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

  48. Use w-40 to set an element to a fixed width(10rem).

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

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

  51. Use w-48 to set an element to a fixed width(12rem).

  52. Use grid to create a grid container.

  53. Use grid to create a grid container.

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

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

  56. Control the vertical padding of an element to 1.5rem using the py-6 utilities.

  57. Control the horizontal margin of an element to 1rem using the mx-4 utilities.

  58. Control the vertical margin of an element to 1rem using the my-4 utilities.

  59. Use h-40 to set an element to a fixed height(10rem).

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

  61. Use w-20 to set an element to a fixed width(5rem).

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

  63. Control the background color of an element to green-300 using the bg-green-300 utilities.

Conclusion

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