- Published on
6 Steps To Make A Todo List With Tailwind CSS Like A Pro In Under An Hour

- What is Tailwind CSS?
- The description of Todo List ui component
- Why use Tailwind CSS to make a Todo List ui component?
- The preview of Todo List ui component
- The source code of Todo List ui component
- How to make a Todo List with Tailwind CSS?
- Install tailwind css of verion 2.2.4
- All the unility class needed to make a Todo List component
- 30 steps to make a Todo List 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 Todo List ui component
Todo list
Why use Tailwind CSS to make a Todo List ui component?
- It can make the building process of Todo List ui component faster and more easily.
- Enables building complex responsive layouts and components freely.
- Minimum lines of CSS code in Todo List component file.
The preview of Todo List ui component
Free download of the Todo List's source code
The source code of Todo List ui component
<div class="bg-slate-100 h-screen">
<nav class="w-full bg-yellow-400 py-4">
<h1 class="text-center text-2xl font-bold">TODO LIST</h1>
</nav>
<div class="flex flex-col w-full pt-28 items-center justify-center">
<div>
<form class="bg-white rounded-md py-10 px-12 shadow-lg">
<h1 class="text-xl mt-2 text-center font-semibold text-gray-600">Whrite Todo List</h1>
<div class="mt-6 flex space-x-4 m-10 justify-center">
<input type="number" placeholder="0" min="0" class="cursor-pointer bg-gray-100 w-10 text-center rounded-md pl-2 outline-none py-2 border-2" />
<input placeholder="write her..." class="bg-gray-100 rounded-md py-2 px-4 border-2 outline-none"/>
<button class="bg-yellow-400 px-4 rounded-md font-semibold">Send</button>
</div>
</p>
</form>
<p class="mt-6 bg-white p-6 rounded-md text-gray-500 shadow-lg"> simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the
<p class="mt-6 bg-white p-6 rounded-md text-gray-500 shadow-lg"> simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the
<p class="mt-6 bg-white p-6 rounded-md text-gray-500 shadow-lg"> simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the
</div>
</section>
<p class="absolute bottom-14 right-14 bg-yellow-400 py-2 px-4 rounded-full text-lg font-bold">?</p>
</div>
</div>
How to make a Todo List 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 make a Todo List component
bg-slate-100
h-screen
w-full
bg-yellow-400
py-4
text-center
text-2xl
flex
flex-col
pt-28
bg-white
py-10
px-12
text-xl
mt-2
text-gray-600
mt-6
m-10
bg-gray-100
w-10
pl-2
py-2
border-2
px-4
p-6
text-gray-500
absolute
bottom-14
right-14
text-lg
30 steps to make a Todo List component with Tailwind CSS
Control the background color of an element to slate-100 using the
bg-slate-100
utilities.Use
h-screen
to make an element span the entire height of the viewport.Use
w-full
to set an element to a 100% based width.Control the background color of an element to yellow-400 using the
bg-yellow-400
utilities.Control the vertical padding of an element to 1rem using the
py-4
utilities.Control the text color of an element to center using the
text-center
utilities.Control the text color of an element to 2xl using the
text-2xl
utilities.Use
flex
to create a block-level flex container.Use
flex
to create a block-level flex container.Control the padding on top side of an element to 7rem using the
pt-28
utilities.Control the background color of an element to white using the
bg-white
utilities.Control the vertical padding of an element to 2.5rem using the
py-10
utilities.Control the horizontal padding of an element to 3rem using the
px-12
utilities.Control the text color of an element to xl using the
text-xl
utilities.Control the margin on top side of an element to 0.5rem using the
mt-2
utilities.Control the text color of an element to gray-600 using the
text-gray-600
utilities.Control the margin on top side of an element to 1.5rem using the
mt-6
utilities.Control the margin on all sides of an element to 2.5rem using the
m-10
utilities.Control the background color of an element to gray-100 using the
bg-gray-100
utilities.Use
w-10
to set an element to a fixed width(2.5rem).Set the left padding of an element to 0.5rem using the
pl-2
utilities classControl the vertical padding of an element to 0.5rem using the
py-2
utilities.Control the border color of an element to 0.5rem using the
border-2
utilities.Control the horizontal padding of an element to 1rem using the
px-4
utilities.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 gray-500 using the
text-gray-500
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 the
bottom-14
utilities to set the bottom position of a positioned element to 3.5rem.Use the
right-14
utilities to set the right position of a positioned element to 3.5rem.Control the text color of an element to lg using the
text-lg
utilities.
Conclusion
The above is a step-by-step tutorial on how to use Tailwind CSS to make a Todo List components, learn and follow along to implement your own components.