- Published on
6 Incredibly Easy Ways To Make A Whyshop With Tailwind CSS Better While Spending Less

- What is Tailwind CSS?
- The description of Whyshop ui component
- Why use Tailwind CSS to make a Whyshop ui component?
- The preview of Whyshop ui component
- The source code of Whyshop ui component
- How to make a Whyshop with Tailwind CSS?
- Install tailwind css of verion 2.2.19
- All the unility class needed to make a Whyshop component
- 31 steps to make a Whyshop 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 Whyshop ui component
Whyshop
Why use Tailwind CSS to make a Whyshop ui component?
- It can make the building process of Whyshop ui component faster and more easily.
- Enables building complex responsive layouts and components freely.
- Minimum lines of CSS code in Whyshop component file.
The preview of Whyshop ui component
Free download of the Whyshop's source code
The source code of Whyshop ui component
<!-- Why Shop Section -->
<section class="bg-white pt-10">
<h1 class="md:text-5xl font-serif font-semibold text-center text-3xl mt-20">Why Shop With Us</h1>
<p class="w-16 mx-auto mt-4 h-1 w-30 bg-red-500"></p>
<div class="grid md:grid-cols-3 gap-y-10 px-4 mt-20 gap-x-6 lg:px-40 md:px-">
<div class="bg-slate-800 flex flex-col items-center py-12 ">
<div class="mb-4">
<svg xmlns="http://www.w3.org/2000/svg" class="h-14 text-white w-14 fill=" none" viewBox="0 0 24 24"
stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M13 10V3L4 14h7v7l9-11h-7z" />
</svg>
</div>
<h2 class="text-white text-2xl font-semibold mb-2">Fast Delivery</h2>
<p class="text-white text-lg w-80 text-center">variations of passages of Lorem Ipsum available</p>
</div>
<div class="bg-slate-800 flex flex-col items-center py-12 ">
<div class="mb-4">
<svg xmlns="http://www.w3.org/2000/svg" class="h-14 text-white w-14 fill=" none" viewBox="0 0 24 24"
stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>
</div>
<h2 class="text-white text-2xl font-semibold mb-2">Free Shiping</h2>
<p class="text-white text-lg w-80 text-center">variations of passages of Lorem Ipsum available</p>
</div>
<div class="bg-slate-800 flex flex-col items-center py-12 ">
<div class="mb-4">
<svg xmlns="http://www.w3.org/2000/svg" class="h-14 text-white w-14 fill=" none" viewBox="0 0 24 24"
stroke="currentColor">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2}
d="M8 13v-1m4 1v-3m4 3V8M8 21l4-4 4 4M3 4h18M4 4h16v12a1 1 0 01-1 1H5a1 1 0 01-1-1V4z" />
</svg>
</div>
<h2 class="text-white text-2xl font-semibold mb-2">Best Quality</h2>
<p class="text-white text-lg w-80 text-center">variations of passages of Lorem Ipsum available</p>
</div>
</div>
</section>
How to make a Whyshop with Tailwind CSS?
Install tailwind css of verion 2.2.19
Use the script
html tag to import the script of Tailwind CSS of the version 2.2.19
<script src="https://cdn.tailwindcss.com"></script>
All the unility class needed to make a Whyshop component
bg-white
pt-10
md:text-5xl
text-center
text-3xl
mt-20
w-16
mx-auto
mt-4
h-1
w-30
bg-red-500
grid
md:grid-cols-3
gap-y-10
px-4
gap-x-6
lg:px-40
md:px-
bg-slate-800
flex
flex-col
py-12
mb-4
h-14
text-white
w-14
text-2xl
mb-2
text-lg
w-80
31 steps to make a Whyshop component with Tailwind CSS
Control the background color of an element to white using the
bg-white
utilities.Control the padding on top side of an element to 2.5rem using the
pt-10
utilities.Control the text color of an element to 5xl at only medium screen sizes using the
md:text-5xl
utilities.Control the text color of an element to center using the
text-center
utilities.Control the text color of an element to 3xl using the
text-3xl
utilities.Control the margin on top side of an element to 5rem using the
mt-20
utilities.Use
w-16
to set an element to a fixed width(4rem).Control the horizontal margin of an element to auto using the
mx-auto
utilities.Control the margin on top side of an element to 1rem using the
mt-4
utilities.Use
h-1
to set an element to a fixed height(0.25rem).Use
w-30
to set an element to a fixed width(7.5rem).Control the background color of an element to red-500 using the
bg-red-500
utilities.Use
grid
to create a grid container.Use
grid
to create a grid container at only medium screen sizes.To specify the width between columns, you can use the
gap-y-10
utilities.Control the horizontal padding of an element to 1rem using the
px-4
utilities.To specify the width between columns, you can use the
gap-x-6
utilities.Control the horizontal padding of an element to 10rem at only large screen sizes using the
lg:px-40
utilities.Control the horizontal padding of an element to at only medium screen sizes using the
md:px-
utilities.Control the background color of an element to slate-800 using the
bg-slate-800
utilities.Use
flex
to create a block-level flex container.Use
flex
to create a block-level flex container.Control the vertical padding of an element to 3rem using the
py-12
utilities.Control the margin on bottom side of an element to 1rem using the
mb-4
utilities.Use
h-14
to set an element to a fixed height(3.5rem).Control the text color of an element to white using the
text-white
utilities.Use
w-14
to set an element to a fixed width(3.5rem).Control the text color of an element to 2xl using the
text-2xl
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 lg using the
text-lg
utilities.Use
w-80
to set an element to a fixed width(20rem).
Conclusion
The above is a step-by-step tutorial on how to use Tailwind CSS to make a Whyshop components, learn and follow along to implement your own components.