- Published on
The Ninja Guide To How To Create A Progress Card Template For Reuse In Any Mathing Situation With Tailwind CSS Better

- What is Tailwind CSS?
- The description of Progress Card Template For Reuse In Any Mathing Situation ui component
- Why use Tailwind CSS to create a Progress Card Template For Reuse In Any Mathing Situation ui component?
- The preview of Progress Card Template For Reuse In Any Mathing Situation ui component
- The source code of Progress Card Template For Reuse In Any Mathing Situation ui component
- How to create a Progress Card Template For Reuse In Any Mathing Situation with Tailwind CSS?
- Install tailwind css of verion 2.2.4
- All the unility class needed to create a Progress Card Template For Reuse In Any Mathing Situation component
- 24 steps to create a Progress Card Template For Reuse In Any Mathing Situation 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 Progress Card Template For Reuse In Any Mathing Situation ui component
Progress card template for reuse in any mathing situation
Why use Tailwind CSS to create a Progress Card Template For Reuse In Any Mathing Situation ui component?
- It can make the building process of Progress Card Template For Reuse In Any Mathing Situation ui component faster and more easily.
- Enables building complex responsive layouts and components freely.
- Minimum lines of CSS code in Progress Card Template For Reuse In Any Mathing Situation component file.
The preview of Progress Card Template For Reuse In Any Mathing Situation ui component
Free download of the Progress Card Template For Reuse In Any Mathing Situation's source code
The source code of Progress Card Template For Reuse In Any Mathing Situation ui component
<style>body{background:white !important;}</style>
<div class="main grid grid-cols-3 gap-10 border mx-auto" style="max-width:800px;">
<div class="card relative p-6 border">
<div class="title font-semibold text-lg mb-2">Item</div>
<div class="desc text-sm">Lorem ipsum dolor sit amet consectetur adipisicing elit. Illum, odit pariatur.
Provident reprehenderit amet nesciunt itaque error tempore cum distinctio. Nam cum, quos odit a rerum
fugit natus similique doloribus?
</div>
</div>
<div class="card relative p-6 border">
<div class="title font-semibold text-lg mb-2">Item</div>
<div class="desc text-sm">Lorem ipsum dolor sit amet consectetur adipisicing elit. Illum, odit pariatur.
Provident reprehenderit amet nesciunt itaque error tempore cum distinctio. Nam cum, quos odit a rerum
fugit natus similique doloribus?
</div>
</div>
<div class="card relative p-6 border">
<div class="title font-semibold text-lg mb-2">Item</div>
<div class="desc text-sm">Lorem ipsum dolor sit amet consectetur adipisicing elit. Illum, odit pariatur.
Provident reprehenderit amet nesciunt itaque error tempore cum distinctio. Nam cum, quos odit a rerum
fugit natus similique doloribus?
</div>
</div>
<div class="card relative p-6 border">
<div class="title font-semibold text-lg mb-2">Item</div>
<div class="desc text-sm">Lorem ipsum dolor sit amet consectetur adipisicing elit. Illum, odit pariatur.
Provident reprehenderit amet nesciunt itaque error tempore cum distinctio. Nam cum, quos odit a rerum
fugit natus similique doloribus?
</div>
</div>
<div class="card relative p-6 border">
<div class="title font-semibold text-lg mb-2">Item</div>
<div class="desc text-sm">Lorem ipsum dolor sit amet consectetur adipisicing elit. Illum, odit pariatur.
Provident reprehenderit amet nesciunt itaque error tempore cum distinctio. Nam cum, quos odit a rerum
fugit natus similique doloribus?
</div>
</div>
</div>
<script>
function setDone(els,until,colsNum){
document.querySelectorAll(".overlay").forEach(each=>each.remove())
for(let i=0;i<until;i++){
let each = els[i]
ol = `<svg class="h-6 w-6 text-gray-600 -right-8 absolute" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 5l7 7-7 7M5 5l7 7-7 7" /></svg>`,
doneEl = `
<div class="absolute overlay w-full z-10 bg-green-200 opacity-95 left-0 top-0 flex items-center justify-center h-full">
<svg class="h-12 w-12 text-green-600" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" /></svg>
${i%(colsNum) < colsNum-1 && i < els.length-1 ? ol:""}
</div>
`
let nEl = document.createElement("div")
nEl.innerHTML = doneEl
each.appendChild(nEl.querySelector("*"))
}
}
// setDone With Below Function
const els = document.querySelectorAll(".card")
setDone(els,2,3)
</script>
How to create a Progress Card Template For Reuse In Any Mathing Situation 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 Progress Card Template For Reuse In Any Mathing Situation component
grid
grid-cols-3
gap-10
mx-auto
relative
p-6
text-lg
mb-2
text-sm
h-6
w-6
text-gray-600
-right-8
absolute
w-full
z-10
bg-green-200
left-0
top-0
flex
h-full
h-12
w-12
text-green-600
24 steps to create a Progress Card Template For Reuse In Any Mathing Situation component with Tailwind CSS
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-10
utilities.Control the horizontal margin of an element to auto using the
mx-auto
utilities.Use
relative
to position an element according to the normal flow of the document.Control the padding on all sides of an element to 1.5rem using the
p-6
utilities.Control the text color of an element to lg using the
text-lg
utilities.Control the margin on bottom side of an element to 0.5rem using the
mb-2
utilities.Control the text color of an element to sm using the
text-sm
utilities.Use
h-6
to set an element to a fixed height(1.5rem).Use
w-6
to set an element to a fixed width(1.5rem).Control the text color of an element to gray-600 using the
text-gray-600
utilities.Use the
-right-8
utilities to set the right position of a positioned element to -2rem.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.Use
w-full
to set an element to a 100% based width.Control the stack order (or three-dimensional positioning) of an element to 10 in Tailwind, regardless of order it has been displayed, using the
z-10
utilities.Control the background color of an element to green-200 using the
bg-green-200
utilities.Use the
left-0
utilities to set the left position of a positioned element to 0rem.Use the
top-0
utilities to set the top position of a positioned element to 0rem.Use
flex
to create a block-level flex container.Use
h-full
to set an element’s height to 100% of its parent, as long as the parent has a defined height.Use
h-12
to set an element to a fixed height(3rem).Use
w-12
to set an element to a fixed width(3rem).Control the text color of an element to green-600 using the
text-green-600
utilities.
Conclusion
The above is a step-by-step tutorial on how to use Tailwind CSS to create a Progress Card Template For Reuse In Any Mathing Situation components, learn and follow along to implement your own components.