- Published on
Ultimate Guide: Build A TailwindCSS Flow chart With Tailwind CSS

- What is Tailwind CSS?
- The description of TailwindCSS Flow chart ui component
- Why use Tailwind CSS to make a TailwindCSS Flow chart ui component?
- The preview of TailwindCSS Flow chart ui component
- The source code of TailwindCSS Flow chart ui component
- How to make a TailwindCSS Flow chart with Tailwind CSS?
- Install tailwind css of verion 1.4.6
- All the unility class needed to make a TailwindCSS Flow chart component
- 28 steps to make a TailwindCSS Flow chart 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 TailwindCSS Flow chart ui component
Example of flow chart using tailwindcss for a company.
Why use Tailwind CSS to make a TailwindCSS Flow chart ui component?
- It can make the building process of TailwindCSS Flow chart ui component faster and more easily.
- Enables building complex responsive layouts and components freely.
- Minimum lines of CSS code in TailwindCSS Flow chart component file.
The preview of TailwindCSS Flow chart ui component
Free download of the TailwindCSS Flow chart's source code
The source code of TailwindCSS Flow chart ui component
<div class="flex flex-col justify-center items-center">
<h1 class="text-3xl top-0 absolute">Organisation Flow chart</h1>
<div class="container mx-auto text-center pt-24">
<div class="items-center justify-center flex">
<div class="text-center">
<div class="flex flex-col justify-center items-center">
<div class="w-16">
<img class="block rounded-full m-auto shadow-md" alt="Duc Sun"
src="https://randomuser.me/api/portraits/men/12.jpg" />
</div>
<div class="text-gray-600">
<p>Duc Sun</p>
<p>ceo</p>
</div>
</div>
<ul class="flex flex-row mt-10 justify-center">
<div class="-mt-10 border-l-2 absolute h-10 border-gray-400"></div>
<li class="relative p-6">
<div class="border-t-2 absolute h-8 border-gray-400 top-0"
style="left: 50%; right: 0px;"></div>
<div class="relative flex justify-center">
<div class="-mt-6 border-l-2 absolute h-6 border-gray-400 top-0"></div>
<div class="text-center">
<div class="flex flex-col justify-center items-center">
<div class="w-16">
<img class="block rounded-full m-auto shadow-md" alt="Leo Six"
src="https://randomuser.me/api/portraits/men/83.jpg" />
</div>
<div class="text-gray-600">
<p>Leo Six</p>
<p>Management</p>
</div>
</div>
<ul class="flex flex-row mt-10 justify-center">
<div class="-mt-10 border-l-2 absolute h-10 border-gray-400"></div>
<li class="relative p-6">
<div class="border-t-2 absolute h-8 border-gray-400 top-0"
style="left: 50%; right: 0px;"></div>
<div class="relative flex justify-center">
<div class="-mt-6 border-l-2 absolute h-6 border-gray-400 top-0">
</div>
<div class="text-center">
<div class="flex flex-col justify-center items-center">
<div class="w-16">
<img class="block rounded-full m-auto shadow-md"
alt="Tab Han"
src="https://randomuser.me/api/portraits/men/46.jpg" />
</div>
<div class="text-gray-600">
<p>Tab Han</p>
<p>Project Manager</p>
</div>
</div>
<ul class="flex flex-row mt-10 justify-center">
<div
class="-mt-10 border-l-2 absolute h-10 border-gray-400">
</div>
<li class="relative p-6">
<div class="border-t-2 absolute h-8 border-gray-400 top-0"
style="left: 50%; right: 0px;"></div>
<div class="relative flex justify-center">
<div
class="-mt-6 border-l-2 absolute h-6 border-gray-400 top-0">
</div>
<div class="text-center">
<div
class="flex flex-col justify-center items-center">
<div class="w-16">
<img class="block rounded-full m-auto shadow-md"
alt="Daniel Zhou"
src="https://randomuser.me/api/portraits/men/76.jpg" />
</div>
<div class="text-gray-600">
<p>Daniel Zhou</p>
<p>Team Lead</p>
</div>
</div>
<ul class="flex flex-row mt-10 justify-center">
<div
class="-mt-10 border-l-2 absolute h-10 border-gray-400">
</div>
<li class="relative p-6">
<div class="border-t-2 absolute h-8 border-gray-400 top-0"
style="left: 50%; right: 0px;">
</div>
<div
class="relative flex justify-center">
<div
class="-mt-6 border-l-2 absolute h-6 border-gray-400 top-0">
</div>
<div class="text-center">
<div
class="flex flex-col justify-center items-center">
<div class="w-16">
<img class="block rounded-full m-auto shadow-md"
alt="Patrick Wang"
src="https://randomuser.me/api/portraits/men/55.jpg" />
</div>
<div class="text-gray-600">
<p>Patrick Wang</p>
<p>Developer</p>
</div>
</div>
</div>
</div>
</li>
<li class="relative p-6">
<div class="border-t-2 absolute h-8 border-gray-400 top-0"
style="left: 0px; right: 50%;">
</div>
<div
class="relative flex justify-center">
<div
class="-mt-6 border-l-2 absolute h-6 border-gray-400 top-0">
</div>
<div class="text-center">
<div
class="flex flex-col justify-center items-center">
<div class="w-16">
<img class="block rounded-full m-auto shadow-md"
alt="Jonsen Li"
src="https://randomuser.me/api/portraits/men/41.jpg" />
</div>
<div class="text-gray-600">
<p>Jonsen Li</p>
<p>Developer</p>
</div>
</div>
</div>
</div>
</li>
</ul>
</div>
</div>
</li>
<li class="relative p-6">
<div class="border-t-2 absolute h-8 border-gray-400 top-0"
style="left: 0px; right: 0px;"></div>
<div class="relative flex justify-center">
<div
class="-mt-6 border-l-2 absolute h-6 border-gray-400 top-0">
</div>
<div class="text-center">
<div
class="flex flex-col justify-center items-center">
<div class="w-16">
<img class="block rounded-full m-auto shadow-md"
alt="Derek Hu"
src="https://randomuser.me/api/portraits/men/44.jpg" />
</div>
<div class="text-gray-600">
<p>Derek Hu</p>
<p>Team Lead</p>
</div>
</div>
<ul class="flex flex-row mt-10 justify-center">
<div
class="-mt-10 border-l-2 absolute h-10 border-gray-400">
</div>
<li class="relative p-6">
<div class="border-t-2 absolute h-8 border-gray-400 top-0"
style="left: 50%; right: 50%;">
</div>
<div
class="relative flex justify-center">
<div
class="-mt-6 border-l-2 absolute h-6 border-gray-400 top-0">
</div>
<div class="text-center">
<div
class="flex flex-col justify-center items-center">
<div class="w-16">
<img class="block rounded-full m-auto shadow-md"
alt="Alfie Zu"
src="https://randomuser.me/api/portraits/men/25.jpg" />
</div>
<div class="text-gray-600">
<p>Alfie Zu</p>
<p>Developer</p>
</div>
</div>
</div>
</div>
</li>
</ul>
</div>
</div>
</li>
<li class="relative p-6">
<div class="border-t-2 absolute h-8 border-gray-400 top-0"
style="left: 0px; right: 50%;"></div>
<div class="relative flex justify-center">
<div
class="-mt-6 border-l-2 absolute h-6 border-gray-400 top-0">
</div>
<div class="text-center">
<div
class="flex flex-col justify-center items-center">
<div class="w-16">
<img class="block rounded-full m-auto shadow-md"
alt="Lennis Chan"
src="https://randomuser.me/api/portraits/men/30.jpg" />
</div>
<div class="text-gray-600">
<p>Lennis Chan</p>
<p>Team Lead</p>
</div>
</div>
</div>
</div>
</li>
</ul>
</div>
</div>
</li>
<li class="relative p-6">
<div class="border-t-2 absolute h-8 border-gray-400 top-0"
style="left: 0px; right: 50%;"></div>
<div class="relative flex justify-center">
<div class="-mt-6 border-l-2 absolute h-6 border-gray-400 top-0">
</div>
<div class="text-center">
<div class="flex flex-col justify-center items-center">
<div class="w-16">
<img class="block rounded-full m-auto shadow-md"
alt="Peter Miao"
src="https://randomuser.me/api/portraits/men/54.jpg" />
</div>
<div class="text-gray-600">
<p>Peter Miao</p>
<p>Project Manager</p>
</div>
</div>
<ul class="flex flex-row mt-10 justify-center">
<div
class="-mt-10 border-l-2 absolute h-10 border-gray-400">
</div>
<li class="relative p-6">
<div class="border-t-2 absolute h-8 border-gray-400 top-0"
style="left: 50%; right: 50%;"></div>
<div class="relative flex justify-center">
<div
class="-mt-6 border-l-2 absolute h-6 border-gray-400 top-0">
</div>
<div class="text-center">
<div
class="flex flex-col justify-center items-center">
<div class="w-16">
<img class="block rounded-full m-auto shadow-md"
alt="Peter Ming"
src="https://randomuser.me/api/portraits/men/90.jpg" />
</div>
<div class="text-gray-600">
<p>Peter Ming</p>
<p>Team Lead</p>
</div>
</div>
</div>
</div>
</li>
</ul>
</div>
</div>
</li>
</ul>
</div>
</div>
</li>
<li class="relative p-6">
<div class="border-t-2 absolute h-8 border-gray-400 top-0"
style="left: 0px; right: 0px;"></div>
<div class="relative flex justify-center">
<div class="-mt-6 border-l-2 absolute h-6 border-gray-400 top-0"></div>
<div class="text-center">
<div class="flex flex-col justify-center items-center">
<div class="w-16">
<img class="block rounded-full m-auto shadow-md" alt="Shi Ten"
src="https://randomuser.me/api/portraits/men/43.jpg" />
</div>
<div class="text-gray-600">
<p>Shi Ten</p>
<p>HR</p>
</div>
</div>
</div>
</div>
</li>
<li class="relative p-6">
<div class="border-t-2 absolute h-8 border-gray-400 top-0"
style="left: 0px; right: 50%;"></div>
<div class="relative flex justify-center">
<div class="-mt-6 border-l-2 absolute h-6 border-gray-400 top-0"></div>
<div class="text-center">
<div class="flex flex-col justify-center items-center">
<div class="w-16">
<img class="block rounded-full m-auto shadow-md" alt="Shawn Mong"
src="https://randomuser.me/api/portraits/men/97.jpg" />
</div>
<div class="text-gray-600">
<p>Shawn Mong</p>
<p>admin</p>
</div>
</div>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<a class="text-md underline text-gray-500 hover:text-gray-700 cursor-pointer bottom-0"
href="https://codesandbox.io/s/github/ravisankarchinnam/tailwindcss-flow-chart">React.js version</a>
</div>
How to make a TailwindCSS Flow chart with Tailwind CSS?
Install tailwind css of verion 1.4.6
Use the link
html tag to import the stylesheet of Tailwind CSS of the version 1.4.6
<link href=https://unpkg.com/[email protected]/dist/tailwind.min.css rel="stylesheet">
All the unility class needed to make a TailwindCSS Flow chart component
flex
flex-col
text-3xl
top-0
absolute
mx-auto
text-center
pt-24
w-16
block
m-auto
text-gray-600
flex-row
mt-10
-mt-10
border-l-2
h-10
border-gray-400
relative
p-6
border-t-2
h-8
-mt-6
h-6
text-md
text-gray-500
hover:text-gray-700
bottom-0
28 steps to make a TailwindCSS Flow chart component with Tailwind CSS
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 3xl using the
text-3xl
utilities.Use the
top-0
utilities to set the top position of a positioned element to 0rem.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.Control the horizontal margin of an element to auto using the
mx-auto
utilities.Control the text color of an element to center using the
text-center
utilities.Control the padding on top side of an element to 6rem using the
pt-24
utilities.Use
w-16
to set an element to a fixed width(4rem).Use
inline
utilities to put the element on its own line and fill its parent.Control the margin on all sides of an element to auto using the
m-auto
utilities.Control the text color of an element to gray-600 using the
text-gray-600
utilities.Use
flex
to create a block-level flex container.Control the margin on top side of an element to 2.5rem using the
mt-10
utilities.Control the margin on top side of an element to -2.5rem using the
-mt-10
utilities.Control the border color of an element to l-2 using the
border-l-2
utilities.Use
h-10
to set an element to a fixed height(2.5rem).Control the border color of an element to gray-400 using the
border-gray-400
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 border color of an element to t-2 using the
border-t-2
utilities.Use
h-8
to set an element to a fixed height(2rem).Control the margin on top side of an element to -1.5rem using the
-mt-6
utilities.Use
h-6
to set an element to a fixed height(1.5rem).Control the text color of an element to md using the
text-md
utilities.Control the text color of an element to gray-500 using the
text-gray-500
utilities.Control the text color of an element to gray-700 on hover using the
hover:text-gray-700
utilities.Use the
bottom-0
utilities to set the bottom position of a positioned element to 0rem.
Conclusion
The above is a step-by-step tutorial on how to use Tailwind CSS to make a TailwindCSS Flow chart components, learn and follow along to implement your own components.