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

- What is Tailwind CSS?
- The description of Wireframe ui component
- Why use Tailwind CSS to build a Wireframe ui component?
- The preview of Wireframe ui component
- The source code of Wireframe ui component
- How to build a Wireframe with Tailwind CSS?
- Install tailwind css of verion 1.4.6
- All the unility class needed to build a Wireframe component
- 63 steps to build a Wireframe component with Tailwind CSS
- Conclusion
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
Control the background color of an element to blue-300 using the
bg-blue-300
utilities.Control the vertical padding of an element to 0.25rem using the
py-1
utilities.Use
flex
to create a block-level flex container.Use
flex
to create a block-level flex container.Control the background color of an element to white using the
bg-white
utilities.Control the vertical padding of an element to 1rem using the
py-4
utilities.Control the horizontal margin of an element to auto using the
mx-auto
utilities.Control the horizontal padding of an element to 2rem using the
px-8
utilities.Use
flex
to create a block-level flex container.Control the text color of an element to white using the
text-white
utilities.Control the margin on right side of an element to 1.5rem using the
mr-6
utilities.Control the text color of an element to white on hover using the
hover:text-white
utilities.Adjust the left padding of an element to 0.5rem using the
pl-2
utilities classUse
h-8
to set an element to a fixed height(2rem).Control the background color of an element to gray-500 using the
bg-gray-500
utilities.Use
w-16
to set an element to a fixed width(4rem).Use
inline
utilities to put the element on its own line and fill its parent.Use
hidden
to set an element to display: none and remove it from the page layout at only large screen sizes.Use
h-1
to set an element to a fixed height(0.25rem).Control the background color of an element to gray-300 using the
bg-gray-300
utilities.Use
w-8
to set an element to a fixed width(2rem).Control the margin on bottom side of an element to 0.25rem using the
mb-1
utilities.Use
w-full
to set an element to a 100% based width.Use
flex
to create a block-level flex container.Use
flex
to create a block-level flex container at only large screen sizes.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.Use
hidden
to set an element to display: none and remove it from the page layout.Use
inline
utilities to put the element on its own line and fill its parent at only large screen sizes.Control the padding on top side of an element to 1.5rem using the
pt-6
utilities.Control the padding on top side of an element to 0rem at only large screen sizes using the
lg:pt-0
utilities.Use
flex
to create a block-level flex container.Control the margin on right side of an element to 0.75rem using the
mr-3
utilities.Use
inline-block
utilities to wrap the element to prevent the text inside from extending beyond its parent.Control the vertical padding of an element to 0.5rem using the
py-2
utilities.Control the horizontal padding of an element to 1rem using the
px-4
utilities.Control the text color of an element to gray-900 on active using the
active:text-gray-900
utilities.Use
h-2
to set an element to a fixed height(0.5rem).Control the background color of an element to gray-400 using the
bg-gray-400
utilities.Control the margin on top side of an element to 0.5rem using the
mt-2
utilities.Control the text color of an element to gray-600 using the
text-gray-600
utilities.Control the text color of an element to gray-200 on hover using the
hover:text-gray-200
utilities.Control the text color of an element to underline on hover using the
hover:text-underline
utilities.Control the horizontal padding of an element to 2rem at only small screen sizes using the
sm:px-8
utilities.Control the text color of an element to center using the
text-center
utilities.Set the maximum width/height of an element using the
max-w-lg
utilities.Control the margin on top side of an element to 1.5rem using the
mt-6
utilities.Use
h-4
to set an element to a fixed height(1rem).Use
w-40
to set an element to a fixed width(10rem).Use
w-64
to set an element to a fixed width(16rem).Control the margin on top side of an element to 1rem using the
mt-4
utilities.Use
w-48
to set an element to a fixed width(12rem).Use
grid
to create a grid container.Use
grid
to create a grid container.To specify the width between columns, you can use the
gap-4
utilities.Control the margin on top side of an element to 2rem using the
mt-8
utilities.Control the vertical padding of an element to 1.5rem using the
py-6
utilities.Control the horizontal margin of an element to 1rem using the
mx-4
utilities.Control the vertical margin of an element to 1rem using the
my-4
utilities.Use
h-40
to set an element to a fixed height(10rem).Control the background color of an element to gray-200 using the
bg-gray-200
utilities.Use
w-20
to set an element to a fixed width(5rem).Control the margin on right side of an element to 0.5rem using the
mr-2
utilities.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.