- Published on
How To Make A Team With Tailwind CSS From Scratch

- What is Tailwind CSS?
- The description of Team ui component
- Why use Tailwind CSS to create a Team ui component?
- The preview of Team ui component
- The source code of Team ui component
- How to create a Team with Tailwind CSS?
- Install tailwind css of verion 2.2.4
- All the unility class needed to create a Team component
- 57 steps to create a Team 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 Team ui component
Team rtl arabic desgin
Why use Tailwind CSS to create a Team ui component?
- It can make the building process of Team ui component faster and more easily.
- Enables building complex responsive layouts and components freely.
- Minimum lines of CSS code in Team component file.
The preview of Team ui component
Free download of the Team's source code
The source code of Team ui component
<head>
<link rel="stylesheet" href="https://use.typekit.net/vqx0mts.css">
<style>
*{
font-family : ibm-plex-arabic, sans-serif
}
</style>
</head>
<section dir="rtl" class="relative w-full bg-white" style="font-family:ibm-plex-arabic, sans-serif;">
<div
class="absolute inset-0 w-full h-full opacity-25 sm:opacity-50 overflow-hidden"
>
<svg
viewBox="0 0 150 350"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
class="absolute top-0 right-0 w-auto h-full opacity-75"
>
<defs>
<path d="M0 0h50v50H0z"></path>
<path d="M0 0h50v50H0z"></path>
<path d="M0 0h150v150H0z"></path>
</defs>
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g>
<g fill="#3B82F6" fill-rule="nonzero">
<path
d="M25 25c13.807 0 25-11.193 25-25H0c0 13.807 11.193 25 25 25z"
></path>
</g>
<g transform="translate(0 100)">
<mask fill="#fff"><use xlink:href="#path-1"></use></mask>
<path
d="M25 0c13.807 0 25 11.193 25 25S38.807 50 25 50H0V0h25z"
fill="#F9C7FF"
mask="url(#mask-2)"
></path>
</g>
<g transform="translate(100 100)">
<mask fill="#fff"><use xlink:href="#path-3"></use></mask>
<path
d="M25 25c13.807 0 25-11.193 25-25H0c0 13.807 11.193 25 25 25z"
fill="#93FFFD"
fill-rule="nonzero"
mask="url(#mask-4)"
></path>
</g>
<g transform="translate(0 200)">
<mask fill="#fff"><use xlink:href="#path-5"></use></mask>
<path
d="M75 75c0 41.421 33.579 75 75 75V0c-41.421 0-75 33.579-75 75z"
fill="#421984"
fill-rule="nonzero"
mask="url(#mask-6)"
></path>
</g>
</g>
</g>
</svg>
<svg
viewBox="0 0 150 150"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
class="absolute top-0 left-0 w-auto h-full opacity-30"
>
<defs>
<path d="M0 0h50v50H0z"></path>
<path d="M0 0h50v50H0z"></path>
</defs>
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g transform="matrix(-1 0 0 1 150 0)">
<g transform="translate(0 25)" fill="#93FFFD" fill-rule="nonzero">
<path
d="M25 0C11.193 0 0 11.193 0 25h50C50 11.193 38.807 0 25 0z"
></path>
</g>
<path
d="M25 50C11.193 50 0 38.807 0 25S11.193 0 25 0h25v50H25z"
transform="translate(100)"
fill="#FF642D"
></path>
<g transform="translate(0 100)">
<mask fill="#fff"><use xlink:href="#path-1"></use></mask>
<path
d="M25 50C11.193 50 0 38.807 0 25S11.193 0 25 0h25v50H25z"
fill="#B3EBFF"
mask="url(#mask-2)"
></path>
</g>
<g transform="translate(100 200)">
<mask fill="#fff"><use xlink:href="#path-3"></use></mask>
<path
d="M25 50C11.193 50 0 38.807 0 25S11.193 0 25 0h25v50H25z"
fill="##7A8AF3"
mask="url(#mask-4)"
></path>
</g>
</g>
</g>
</svg>
</div>
<div
class="relative w-full px-4 pt-16 pb-16 mx-auto bg-top bg-cover max-w-6xl lg:py-24 lg:pb-32"
>
<div
class="max-w-xl mb-10 ml-auto mr-auto bg-top bg-cover md:mx-auto sm:text-center lg:max-w-2xl md:mb-12"
>
<p
class="inline-block px-3 py-1 mb-4 text-xs font-semibold tracking-wider uppercase bg-blue-600 rounded-full text-purple-50"
>
فريق العمل
</p>
<div
class="max-w-2xl mb-6 ml-auto mr-auto tracking-tight text-gray-900 bg-top bg-cover sm:text-4xl md:mx-auto"
>
<p
class="inline max-w-lg text-3xl font-bold leading-none tracking-tight text-gray-900 sm:text-4xl md:mx-auto"
>
لدينا فريق رائع من الأفراد الفريدين
</p>
</div>
<p class="text-base text-gray-700 md:text-lg">
هؤلاء هم الأشخاص الرائعون الذين يجعلوننا متميز ومختلفين عن
المنافسين. نحن فريق من الأفراد المهتمين والموهوبين.
</p>
</div>
<div
class="grid gap-10 row-gap-8 ml-auto mr-auto sm:row-gap-10 lg:max-w-screen-lg sm:grid-cols-2 lg:grid-cols-3"
>
<div class="flex items-center">
<img
src="https://sufyan.me/_nuxt/images/sufyan-e995a0.webp"
class="object-cover w-20 h-20 ml-4 rounded-full shadow"
/>
<div class="relative">
<p class="text-lg font-bold text-gray-800">سفيان</p>
<p class="text-sm text-gray-600">CEO & Founder</p>
</div>
</div>
<div class="flex items-center">
<img
src="https://images.unsplash.com/photo-1570295999919-56ceb5ecca61?ixid=MnwxMjA3fDB8MHxzZWFyY2h8Mnx8dXNlcnxlbnwwfDJ8MHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=600&q=60"
class="object-cover w-20 h-20 ml-4 rounded-full shadow"
/>
<div class="relative">
<p class="text-lg font-bold text-gray-800">أحمد السالم</p>
<p class="text-sm text-gray-600">Co-Founder</p>
</div>
</div>
<div class="flex items-center">
<img
src="https://images.unsplash.com/photo-1597223557154-721c1cecc4b0?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8cGVyc29ufGVufDB8MnwwfHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=600&q=60"
class="object-cover w-20 h-20 ml-4 rounded-full shadow"
/>
<div class="relative">
<p class="text-lg font-bold text-gray-800">منى علي</p>
<p class="text-sm text-gray-600">software engineering</p>
</div>
</div>
<div class="flex items-center">
<img
src="https://images.unsplash.com/photo-1597223557154-721c1cecc4b0?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8cGVyc29ufGVufDB8MnwwfHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=600&q=60"
class="object-cover w-20 h-20 ml-4 rounded-full shadow"
/>
<div class="relative">
<p class="text-lg font-bold text-gray-800">نوره عبدالله</p>
<p class="text-sm text-gray-600">Designer</p>
</div>
</div>
<div class="flex items-center">
<img
src="https://images.unsplash.com/photo-1570295999919-56ceb5ecca61?ixid=MnwxMjA3fDB8MHxzZWFyY2h8Mnx8dXNlcnxlbnwwfDJ8MHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=600&q=60"
class="object-cover w-20 h-20 ml-4 rounded-full shadow"
/>
<div class="relative">
<p class="text-lg font-bold text-gray-800">منصور أحمد</p>
<p class="text-sm text-gray-600">Lead Designer</p>
</div>
</div>
<div class="flex items-center">
<img
src="https://images.unsplash.com/photo-1570295999919-56ceb5ecca61?ixid=MnwxMjA3fDB8MHxzZWFyY2h8Mnx8dXNlcnxlbnwwfDJ8MHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=600&q=60"
class="object-cover w-20 h-20 ml-4 rounded-full shadow"
/>
<div class="relative">
<p class="text-lg font-bold text-gray-800">تركي ناصر</p>
<p class="text-sm text-gray-600">Markting</p>
</div>
</div>
</div>
</div>
</section>
How to create a Team 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 Team component
relative
w-full
bg-white
absolute
h-full
overflow-hidden
top-0
right-0
w-auto
left-0
px-4
pt-16
pb-16
mx-auto
bg-top
bg-cover
max-w-6xl
lg:py-24
lg:pb-32
max-w-xl
mb-10
ml-auto
mr-auto
md:mx-auto
sm:text-center
lg:max-w-2xl
md:mb-12
inline-block
px-3
py-1
mb-4
text-xs
bg-blue-600
text-purple-50
max-w-2xl
mb-6
text-gray-900
sm:text-4xl
inline
max-w-lg
text-3xl
text-base
text-gray-700
md:text-lg
grid
gap-10
lg:max-w-screen-lg
sm:grid-cols-2
lg:grid-cols-3
flex
w-20
h-20
ml-4
text-lg
text-gray-800
text-sm
text-gray-600
57 steps to create a Team component with Tailwind CSS
Use
relative
to position an element according to the normal flow of the document.Use
w-full
to set an element to a 100% based width.Control the background color of an element to white using the
bg-white
utilities.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
h-full
to set an element’s height to 100% of its parent, as long as the parent has a defined height.Use
overflow-hidden
to clip any content within an element that overflows the bounds of that element.Use the
top-0
utilities to set the top position of a positioned element to 0rem.Use the
right-0
utilities to set the right position of a positioned element to 0rem.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 the
left-0
utilities to set the left position of a positioned element to 0rem.Control the horizontal padding of an element to 1rem using the
px-4
utilities.Control the padding on top side of an element to 4rem using the
pt-16
utilities.Control the padding on bottom side of an element to 4rem using the
pb-16
utilities.Control the horizontal margin of an element to auto using the
mx-auto
utilities.Control the background color of an element to top using the
bg-top
utilities.Control the background color of an element to cover using the
bg-cover
utilities.Set the maximum width/height of an element using the
max-w-6xl
utilities.Control the vertical padding of an element to 6rem at only large screen sizes using the
lg:py-24
utilities.Control the padding on bottom side of an element to 8rem at only large screen sizes using the
lg:pb-32
utilities.Set the maximum width/height of an element using the
max-w-xl
utilities.Control the margin on bottom side of an element to 2.5rem using the
mb-10
utilities.Control the margin on left side of an element to auto using the
ml-auto
utilities.Control the margin on right side of an element to auto using the
mr-auto
utilities.Control the horizontal margin of an element to auto at only medium screen sizes using the
md:mx-auto
utilities.Control the text color of an element to center at only small screen sizes using the
sm:text-center
utilities.Set the maximum width/height of an element using the
lg:max-w-2xl
utilities at only large screen sizes.Control the margin on bottom side of an element to 3rem at only medium screen sizes using the
md:mb-12
utilities.Use
inline-block
utilities to wrap the element to prevent the text inside from extending beyond its parent.Control the horizontal padding of an element to 0.75rem using the
px-3
utilities.Control the vertical padding of an element to 0.25rem using the
py-1
utilities.Control the margin on bottom side of an element to 1rem using the
mb-4
utilities.Control the text color of an element to xs using the
text-xs
utilities.Control the background color of an element to blue-600 using the
bg-blue-600
utilities.Control the text color of an element to purple-50 using the
text-purple-50
utilities.Set the maximum width/height of an element using the
max-w-2xl
utilities.Control the margin on bottom side of an element to 1.5rem using the
mb-6
utilities.Control the text color of an element to gray-900 using the
text-gray-900
utilities.Control the text color of an element to 4xl at only small screen sizes using the
sm:text-4xl
utilities.Use
inline
utilities to control the flow of text inside the element to wrap normally.Set the maximum width/height of an element using the
max-w-lg
utilities.Control the text color of an element to 3xl using the
text-3xl
utilities.Control the text color of an element to base using the
text-base
utilities.Control the text color of an element to gray-700 using the
text-gray-700
utilities.Control the text color of an element to lg at only medium screen sizes using the
md:text-lg
utilities.Use
grid
to create a grid container.To specify the width between columns, you can use the
gap-10
utilities.Set the maximum width/height of an element using the
lg:max-w-screen-lg
utilities at only large screen sizes.Use
grid
to create a grid container at only small screen sizes.Use
grid
to create a grid container at only large screen sizes.Use
flex
to create a block-level flex container.Use
w-20
to set an element to a fixed width(5rem).Use
h-20
to set an element to a fixed height(5rem).Control the margin on left side of an element to 1rem using the
ml-4
utilities.Control the text color of an element to lg using the
text-lg
utilities.Control the text color of an element to gray-800 using the
text-gray-800
utilities.Control the text color of an element to sm using the
text-sm
utilities.Control the text color of an element to gray-600 using the
text-gray-600
utilities.
Conclusion
The above is a step-by-step tutorial on how to use Tailwind CSS to create a Team components, learn and follow along to implement your own components.