- Published on
Ways To Build A Hieu With Tailwind CSS In 60 Minutes

- What is Tailwind CSS?
- The description of Hieu ui component
- Why use Tailwind CSS to make a Hieu ui component?
- The preview of Hieu ui component
- The source code of Hieu ui component
- How to make a Hieu with Tailwind CSS?
- Install tailwind css of verion 1.9.6
- All the unility class needed to make a Hieu component
- 19 steps to make a Hieu 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 Hieu ui component
Avatar introduce
Why use Tailwind CSS to make a Hieu ui component?
- It can make the building process of Hieu ui component faster and more easily.
- Enables building complex responsive layouts and components freely.
- Minimum lines of CSS code in Hieu component file.
The preview of Hieu ui component
Free download of the Hieu's source code
The source code of Hieu ui component
<div class="relative wrap overflow-hidden p-10 h-full bg-white">
<div class="container">
<div
class="flex flex-col md:grid grid-cols-3 mx-auto p-2 text-blue-50">
<div class="flex flex-row-reverse md:contents">
<div class="bg-white col-start-1 col-end-1 pr-8 rounded-xl my-4 ml-auto">
<img class="leading-tight text-justify" src="https://img.icons8.com/ios/452/warranty.png">
<h3>Founder</h3>
<p class="font-bold font-serif text-lg">Person name</p>
</div>
<div class="bg-white col-start-2 col-end-2 pr-8 rounded-xl my-4 ml-auto">
<img class="leading-tight text-justify" src="https://img.icons8.com/ios/452/warranty.png">
<h3>Director</h3>
<p class="font-bold font-serif text-lg">Person name</p>
</div>
<div class="bg-white col-start-3 col-end-3 pr-8 rounded-xl my-4 ml-auto">
<img class="leading-tight text-justify" src="https://img.icons8.com/ios/452/warranty.png">
<h3>Chief of Marketing</h3>
<p class="font-bold font-serif text-lg">Person name</p>
</div>
</div>
</div>
</div>
</div>
How to make a Hieu with Tailwind CSS?
Install tailwind css of verion 1.9.6
Use the link
html tag to import the stylesheet of Tailwind CSS of the version 1.9.6
<link href=https://unpkg.com/[email protected]/dist/tailwind.min.css rel="stylesheet">
All the unility class needed to make a Hieu component
relative
overflow-hidden
p-10
h-full
bg-white
flex
flex-col
md:grid
grid-cols-3
mx-auto
p-2
text-blue-50
flex-row-reverse
md:contents
pr-8
my-4
ml-auto
text-justify
text-lg
19 steps to make a Hieu component with Tailwind CSS
Use
relative
to position an element according to the normal flow of the document.Use
overflow-hidden
to clip any content within an element that overflows the bounds of that element.Control the padding on all sides of an element to 2.5rem using the
p-10
utilities.Use
h-full
to set an element’s height to 100% of its parent, as long as the parent has a defined height.Control the background color of an element to white using the
bg-white
utilities.Use
flex
to create a block-level flex container.Use
flex
to create a block-level flex container.Use
grid
to create a grid container at only medium screen sizes.Use
grid
to create a grid container.Control the horizontal margin of an element to auto using the
mx-auto
utilities.Control the padding on all sides of an element to 0.5rem using the
p-2
utilities.Control the text color of an element to blue-50 using the
text-blue-50
utilities.Use
flex
to create a block-level flex container.Use
contents
to create a “phantom” container whose children act like direct children of the parert at only medium screen sizes.Control the padding on right side of an element to 2rem using the
pr-8
utilities.Control the vertical margin of an element to 1rem using the
my-4
utilities.Control the margin on left side of an element to auto using the
ml-auto
utilities.Control the text color of an element to justify using the
text-justify
utilities.Control the text color of an element to lg using the
text-lg
utilities.
Conclusion
The above is a step-by-step tutorial on how to use Tailwind CSS to make a Hieu components, learn and follow along to implement your own components.