- Published on
Learn How To Create A Timeline With Tailwind CSS from the Pros

- What is Tailwind CSS?
- The description of Timeline ui component
- Why use Tailwind CSS to make a Timeline ui component?
- The preview of Timeline ui component
- The source code of Timeline ui component
- How to make a Timeline with Tailwind CSS?
- Install tailwind css of verion 0.3.0
- All the unility class needed to make a Timeline component
- 61 steps to make a Timeline 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 Timeline ui component
Timeline inspired by facebook & twitter.
Why use Tailwind CSS to make a Timeline ui component?
- It can make the building process of Timeline ui component faster and more easily.
- Enables building complex responsive layouts and components freely.
- Minimum lines of CSS code in Timeline component file.
The preview of Timeline ui component
Free download of the Timeline's source code
The source code of Timeline ui component
<div class="font-sans">
<div class="bg-white max-w-md mx-auto my-8 border border-grey-light rounded-t-lg overflow-hidden">
<div class="flex flex-wrap no-underline text-black h-64 overflow-hidden">
<div class="w-3/4 h-full">
<img class="block pr-px w-full h-full" src="https://pbs.twimg.com/media/DRKabGUW0AA4yzH.jpg:large" alt=""
style="object-fit: cover;">
</div>
<div class="w-1/4 h-full">
<div class="bg-grey-darkest mb-px h-32">
<img class="block w-full h-full" src="https://pbs.twimg.com/media/DRKabdIX0AAN-Pa.jpg" alt=""
style="object-fit: cover;">
</div>
<div class="bg-grey-darkest h-32">
<img class="block w-full h-full" src="https://pbs.twimg.com/media/DRKacEZWkAAg0-l.jpg" alt=""
style="object-fit: cover;">
</div>
</div>
</div>
<div class="flex pt-4 px-4">
<div class="w-16 mr-2">
<img class="p-2 rounded rounded-full"
src="https://scontent-frt3-1.cdninstagram.com/t51.2885-19/s150x150/22638783_1031626323645160_6412994168498421760_n.jpg">
</div>
<div class="px-2 pt-2 flex-grow">
<header>
<a href="#" class="text-black no-underline">
<span class="font-medium">Rathes Sachchithananthan</span>
<span class="font-normal text-grey">@rathes</span>
</a>
<div class="text-xs text-grey flex items-center my-1">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="h-4 w-4 mr-1 feather feather-calendar">
<rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect>
<line x1="16" y1="2" x2="16" y2="6"></line>
<line x1="8" y1="2" x2="8" y2="6"></line>
<line x1="3" y1="10" x2="21" y2="10"></line>
</svg>
<span>2 hours ago</span>
</div>
</header>
<article class="py-4 text-grey-darkest">
Lorem ipsum sit dolor et amet et cetera og quandum morales.
</article>
<footer class="border-t border-grey-lighter text-sm flex">
<a href="#" class="block no-underline text-blue flex px-4 py-2 items-center hover:bg-grey-lighter">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-thumbs-up h-6 w-6 mr-1 stroke-current">
<path d="M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"></path>
</svg>
<span>Liked</span>
</a>
<a href="#" class="block no-underline text-black flex px-4 py-2 items-center hover:bg-grey-lighter">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-message-circle h-6 w-6 mr-1">
<path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"></path>
</svg>
<span>Reply</span>
</a>
</footer>
</div>
</div>
</div>
<div class="bg-white max-w-md mx-auto my-8 border border-grey-light">
<div class="flex pt-4 px-4">
<div class="w-16 mr-2">
<img class="p-2 rounded rounded-full"
src="https://scontent-frt3-1.cdninstagram.com/t51.2885-19/s150x150/22638783_1031626323645160_6412994168498421760_n.jpg">
</div>
<div class="px-2 pt-2 flex-grow">
<header>
<a href="#" class="text-black no-underline">
<span class="font-medium">Rathes Sachchithananthan</span>
<span class="font-normal text-grey">@rathes</span>
</a>
<div class="text-xs text-grey flex items-center my-1">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="h-4 w-4 mr-1 feather feather-calendar">
<rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect>
<line x1="16" y1="2" x2="16" y2="6"></line>
<line x1="8" y1="2" x2="8" y2="6"></line>
<line x1="3" y1="10" x2="21" y2="10"></line>
</svg>
<span>2 hours ago</span>
</div>
</header>
<article class="py-4 text-grey-darkest">
Lorem ipsum sit dolor et amet et cetera og quandum morales.
</article>
<footer class="border-t border-grey-lighter text-sm flex">
<a href="#" class="block no-underline text-black flex px-4 py-2 items-center hover:bg-grey-lighter">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-thumbs-up h-6 w-6 mr-1">
<path d="M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"></path>
</svg>
<span>Like</span>
</a>
<a href="#" class="block no-underline text-black flex px-4 py-2 items-center hover:bg-grey-lighter">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-message-circle h-6 w-6 mr-1">
<path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"></path>
</svg>
<span>Reply</span>
</a>
</footer>
</div>
</div>
<div class="bg-grey-lightest p-4 pl-8 flex border-t border-grey-light">
<div class="w-12 mr-2 flex-no-shrink">
<img class="p-2 rounded rounded-full"
src="https://scontent-frt3-1.cdninstagram.com/t51.2885-19/s150x150/22638783_1031626323645160_6412994168498421760_n.jpg">
</div>
<div class="p-2 flex-grow">
<header>
<a href="#" class="text-black no-underline">
<span class="font-medium">Max Mustermann</span>
<span class="font-normal text-grey">@max_the_great</span>
</a>
<div class="text-xs text-grey flex items-center my-1">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="h-4 w-4 mr-1 feather feather-calendar">
<rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect>
<line x1="16" y1="2" x2="16" y2="6"></line>
<line x1="8" y1="2" x2="8" y2="6"></line>
<line x1="3" y1="10" x2="21" y2="10"></line>
</svg>
<span>A few minutes ago</span>
</div>
</header>
<article class="py-4 text-grey-darkest">
Lorem ipsum no lo se dolores ametandum come
</article>
<footer class="border-t border-grey-lighter text-sm flex">
<a href="#" class="block no-underline text-black flex px-4 py-2 items-center hover:bg-grey-lighter">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-thumbs-up h-6 w-6 mr-1">
<path d="M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"></path>
</svg>
<span>Like</span>
</a>
<a href="#" class="block no-underline text-black flex px-4 py-2 items-center hover:bg-grey-lighter">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-message-circle h-6 w-6 mr-1">
<path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"></path>
</svg>
<span>Reply</span>
</a>
</footer>
</div>
</div>
<div class="bg-grey-lightest p-4 pl-8 flex border-t border-grey-lighter">
<div class="w-12 mr-2 flex-no-shrink">
<img class="p-2 rounded rounded-full"
src="https://scontent-frt3-1.cdninstagram.com/t51.2885-19/s150x150/22638783_1031626323645160_6412994168498421760_n.jpg">
</div>
<div class="p-2 flex-grow">
<header>
<a href="#" class="text-black no-underline">
<span class="font-medium">Moritz Mustermann</span>
<span class="font-normal text-grey">@mo</span>
</a>
<div class="text-xs text-grey flex items-center my-1">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="h-4 w-4 mr-1 feather feather-calendar">
<rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect>
<line x1="16" y1="2" x2="16" y2="6"></line>
<line x1="8" y1="2" x2="8" y2="6"></line>
<line x1="3" y1="10" x2="21" y2="10"></line>
</svg>
<span>Just now</span>
</div>
</header>
<article class="py-4 text-grey-darkest leading-normal">
<a class="no-underline text-blue" href="#">@max_the_great</a> Lorem ipsum no lo se dolores ametandum no come,
astare pero canime perferme
</article>
<footer class="border-t border-grey-lighter text-sm flex">
<a href="#" class="block no-underline text-black flex px-4 py-2 items-center hover:bg-grey-lighter">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-thumbs-up h-6 w-6 mr-1">
<path d="M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"></path>
</svg>
<span>Like</span>
</a>
<a href="#" class="block no-underline text-black flex mr-4 px-4 py-2 items-center hover:bg-grey-lighter">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-message-circle h-6 w-6 mr-1">
<path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"></path>
</svg>
<span>Reply</span>
</a>
</footer>
</div>
</div>
<div class="bg-grey-lighter p-4 pl-8">
<textarea class="w-full border border-blue rounded"></textarea>
<div class="flex justify-between items-center mt-2">
<button class="p-2 text-blue leading-none rounded border border-transparent hover:border-blue">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-image">
<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect>
<circle cx="8.5" cy="8.5" r="1.5"></circle>
<polyline points="21 15 16 10 5 21"></polyline>
</svg>
</button>
<button class="py-2 px-4 bg-white border border-blue rounded rounded-full
hover:bg-blue hover:text-white">
Reply
</button>
</div>
</div>
</div>
<div class="bg-white max-w-md mx-auto my-8 border border-grey-light">
<div class="flex pt-4 px-4">
<div class="w-16 mr-2">
<img class="p-2 rounded rounded-full"
src="https://scontent-frt3-1.cdninstagram.com/t51.2885-19/s150x150/22638783_1031626323645160_6412994168498421760_n.jpg">
</div>
<div class="px-2 pt-2 flex-grow">
<header>
<a href="#" class="text-black no-underline">
<span class="font-medium">Rathes Sachchithananthan</span>
<span class="font-normal text-grey">@rathes</span>
</a>
<div class="text-xs text-grey flex items-center my-1">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="h-4 w-4 mr-1 feather feather-calendar">
<rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect>
<line x1="16" y1="2" x2="16" y2="6"></line>
<line x1="8" y1="2" x2="8" y2="6"></line>
<line x1="3" y1="10" x2="21" y2="10"></line>
</svg>
<span>2 hours ago</span>
</div>
</header>
<article class="py-4 text-grey-darkest">
Lorem ipsum sit dolor et amet et cetera og quandum morales.
</article>
<footer class="border-t border-grey-lighter text-sm flex">
<a href="#" class="block no-underline text-blue flex px-4 py-2 items-center hover:bg-grey-lighter">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-thumbs-up h-6 w-6 mr-1 stroke-current">
<path d="M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"></path>
</svg>
<span>Liked</span>
</a>
<a href="#" class="block no-underline text-black flex px-4 py-2 items-center hover:bg-grey-lighter">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-message-circle h-6 w-6 mr-1">
<path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"></path>
</svg>
<span>Reply</span>
</a>
</footer>
</div>
</div>
<div class="bg-grey-lightest p-4 pl-8 flex border-t border-grey-lighter">
<div class="w-12 mr-2 flex-no-shrink">
<img class="p-2 rounded rounded-full"
src="https://scontent-frt3-1.cdninstagram.com/t51.2885-19/s150x150/22638783_1031626323645160_6412994168498421760_n.jpg">
</div>
<div class="p-2 flex-grow">
<header>
<a href="#" class="text-black no-underline">
<span class="font-medium">Moritz Mustermann</span>
<span class="font-normal text-grey">@mo</span>
</a>
<div class="text-xs text-grey flex items-center my-1">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="h-4 w-4 mr-1 feather feather-calendar">
<rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect>
<line x1="16" y1="2" x2="16" y2="6"></line>
<line x1="8" y1="2" x2="8" y2="6"></line>
<line x1="3" y1="10" x2="21" y2="10"></line>
</svg>
<span>Just now</span>
</div>
</header>
<article class="py-4 text-grey-darkest leading-normal">
<a class="no-underline text-blue" href="#">@max_the_great</a> Lorem ipsum no lo se dolores ametandum no come,
astare pero canime perferme
</article>
<footer class="border-t border-grey-lighter text-sm flex">
<a href="#" class="block no-underline text-blue flex px-4 py-2 items-center hover:bg-grey-lighter">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-thumbs-up h-6 w-6 mr-1 stroke-current">
<path d="M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"></path>
</svg>
<span>Liked</span>
</a>
<a href="#" class="block no-underline text-black flex mr-4 px-4 py-2 items-center hover:bg-grey-lighter">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-message-circle h-6 w-6 mr-1">
<path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"></path>
</svg>
<span>Reply</span>
</a>
</footer>
</div>
</div>
</div>
<div class="bg-white max-w-md mx-auto my-8 border border-grey-light">
<a href="https://uxplanet.org/redesign-neiman-marcus-ios-app-5a0db3119b36"
class="block border-b border-grey-light no-underline text-black">
<img src="https://cdn-images-1.medium.com/max/1000/1*0SiPB4-TouBdJCpVwGwLdw.png" alt="">
<div class="p-4">
<h2 class="font-medium text-lg mb-2">How I Redesign - Neiman Marcus iOS App</h2>
<p class="leading-normal mb-4 text-grey-darker">
Neiman Marcus, is an American Flagship department store which is among the most prestigious luxury
stores. However, its iOS App is barely satisfactory.
</p>
<span class="text-sm text-grey">
https://uxplanet.org/redesign-neiman-marcus-ios-app-5a0db3119b36
</span>
</div>
</a>
<div class="flex pt-4 px-4">
<div class="w-16 mr-2">
<img class="p-2 rounded rounded-full"
src="https://scontent-frt3-1.cdninstagram.com/t51.2885-19/s150x150/22638783_1031626323645160_6412994168498421760_n.jpg">
</div>
<div class="px-2 pt-2 flex-grow">
<header>
<a href="#" class="text-black no-underline">
<span class="font-medium">Rathes Sachchithananthan</span>
<span class="font-normal text-grey">@rathes</span>
</a>
<div class="text-xs text-grey flex items-center my-1">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="h-4 w-4 mr-1 feather feather-calendar">
<rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect>
<line x1="16" y1="2" x2="16" y2="6"></line>
<line x1="8" y1="2" x2="8" y2="6"></line>
<line x1="3" y1="10" x2="21" y2="10"></line>
</svg>
<span>2 hours ago</span>
</div>
</header>
<article class="py-4 text-grey-darkest">
Lorem ipsum sit dolor et amet et cetera og quandum morales.
</article>
<footer class="border-t border-grey-lighter text-sm flex">
<a href="#" class="block no-underline text-blue flex px-4 py-2 items-center hover:bg-grey-lighter">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-thumbs-up h-6 w-6 mr-1 stroke-current">
<path d="M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"></path>
</svg>
<span>Liked</span>
</a>
<a href="#" class="block no-underline text-black flex px-4 py-2 items-center hover:bg-grey-lighter">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-message-circle h-6 w-6 mr-1">
<path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"></path>
</svg>
<span>Reply</span>
</a>
</footer>
</div>
</div>
</div>
</div>
How to make a Timeline with Tailwind CSS?
Install tailwind css of verion 0.3.0
Use the link
html tag to import the stylesheet of Tailwind CSS of the version 0.3.0
<link href=https://unpkg.com/[email protected]/dist/tailwind.min.css rel="stylesheet">
All the unility class needed to make a Timeline component
bg-white
max-w-md
mx-auto
my-8
border-grey-light
overflow-hidden
flex
flex-wrap
text-black
h-64
w-3/4
h-full
block
pr-px
w-full
w-1/4
bg-grey-darkest
mb-px
h-32
pt-4
px-4
w-16
mr-2
p-2
px-2
pt-2
flex-grow
text-grey
text-xs
my-1
h-4
w-4
mr-1
py-4
text-grey-darkest
border-t
border-grey-lighter
text-sm
text-blue
py-2
hover:bg-grey-lighter
h-6
w-6
bg-grey-lightest
p-4
pl-8
w-12
flex-no-shrink
mr-4
bg-grey-lighter
border-blue
mt-2
border-transparent
hover:border-blue
hover:bg-blue
hover:text-white
border-b
text-lg
mb-2
mb-4
text-grey-darker
61 steps to make a Timeline component with Tailwind CSS
Control the background color of an element to white using the
bg-white
utilities.Set the maximum width/height of an element using the
max-w-md
utilities.Control the horizontal margin of an element to auto using the
mx-auto
utilities.Control the vertical margin of an element to 2rem using the
my-8
utilities.Control the border color of an element to grey-light using the
border-grey-light
utilities.Use
overflow-hidden
to clip any content within an element that overflows the bounds of that element.Use
flex
to create a block-level flex container.Use
flex
to create a block-level flex container.Control the text color of an element to black using the
text-black
utilities.Use
h-64
to set an element to a fixed height(16rem).Use
w-3/4
to set an element to a fixed width(3/4).Use
h-full
to set an element’s height to 100% of its parent, as long as the parent has a defined height.Use
inline
utilities to put the element on its own line and fill its parent.Control the padding on right side of an element to px using the
pr-px
utilities.Use
w-full
to set an element to a 100% based width.Use
w-1/4
to set an element to a fixed width(1/4).Control the background color of an element to grey-darkest using the
bg-grey-darkest
utilities.Control the margin on bottom side of an element to px using the
mb-px
utilities.Use
h-32
to set an element to a fixed height(8rem).Control the padding on top side of an element to 1rem using the
pt-4
utilities.Control the horizontal padding of an element to 1rem using the
px-4
utilities.Use
w-16
to set an element to a fixed width(4rem).Control the margin on right side of an element to 0.5rem using the
mr-2
utilities.Control the padding on all sides of an element to 0.5rem using the
p-2
utilities.Control the horizontal padding of an element to 0.5rem using the
px-2
utilities.Control the padding on top side of an element to 0.5rem using the
pt-2
utilities.Use
flex
to create a block-level flex container.Control the text color of an element to grey using the
text-grey
utilities.Control the text color of an element to xs using the
text-xs
utilities.Control the vertical margin of an element to 0.25rem using the
my-1
utilities.Use
h-4
to set an element to a fixed height(1rem).Use
w-4
to set an element to a fixed width(1rem).Control the margin on right side of an element to 0.25rem using the
mr-1
utilities.Control the vertical padding of an element to 1rem using the
py-4
utilities.Control the text color of an element to grey-darkest using the
text-grey-darkest
utilities.Control the border color of an element to t using the
border-t
utilities.Control the border color of an element to grey-lighter using the
border-grey-lighter
utilities.Control the text color of an element to sm using the
text-sm
utilities.Control the text color of an element to blue using the
text-blue
utilities.Control the vertical padding of an element to 0.5rem using the
py-2
utilities.Control the background color of an element to grey-lighter using the
hover:bg-grey-lighter
utilities on hover.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 background color of an element to grey-lightest using the
bg-grey-lightest
utilities.Control the padding on all sides of an element to 1rem using the
p-4
utilities.Set the left padding of the element to 2rem using the
pl-8
utilities classUse
w-12
to set an element to a fixed width(3rem).Use
flex
to create a block-level flex container.Control the margin on right side of an element to 1rem using the
mr-4
utilities.Control the background color of an element to grey-lighter using the
bg-grey-lighter
utilities.Control the border color of an element to blue using the
border-blue
utilities.Control the margin on top side of an element to 0.5rem using the
mt-2
utilities.Control the border color of an element to transparent using the
border-transparent
utilities.Control the border color of an element to blue using the
hover:border-blue
utilities on hover.Control the background color of an element to blue using the
hover:bg-blue
utilities on hover.Control the text color of an element to white on hover using the
hover:text-white
utilities.Control the border color of an element to b using the
border-b
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 margin on bottom side of an element to 1rem using the
mb-4
utilities.Control the text color of an element to grey-darker using the
text-grey-darker
utilities.
Conclusion
The above is a step-by-step tutorial on how to use Tailwind CSS to make a Timeline components, learn and follow along to implement your own components.