- Published on
3 Things You Must Know To Create A Facebook Login Page With Tailwind CSS

- What is Tailwind CSS?
- The description of Facebook Login Page ui component
- Why use Tailwind CSS to make a Facebook Login Page ui component?
- The preview of Facebook Login Page ui component
- The source code of Facebook Login Page ui component
- How to make a Facebook Login Page with Tailwind CSS?
- Install tailwind css of verion 2.0.2
- All the unility class needed to make a Facebook Login Page component
- 33 steps to make a Facebook Login Page 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 Facebook Login Page ui component
Facebook login component
Why use Tailwind CSS to make a Facebook Login Page ui component?
- It can make the building process of Facebook Login Page ui component faster and more easily.
- Enables building complex responsive layouts and components freely.
- Minimum lines of CSS code in Facebook Login Page component file.
The preview of Facebook Login Page ui component
Free download of the Facebook Login Page's source code
The source code of Facebook Login Page ui component
<div class="p-20 h-screen w-screen flex flex-col-reverse md:flex-row items-center justify-center bg-gray-200">
<div class="content text-3xl text-center md:text-left">
<h1 class="text-5xl text-blue-500 font-bold">Facebook</h1>
<p>Connect with friends and the world around you on Facebook.</p>
</div>
<div class="container mx-auto flex flex-col items-center">
<form class="shadow-lg w-80 p-4 flex flex-col bg-white rounded-lg">
<input type="text" placeholder="Email or Phone Number" class="mb-3 py-3 px-4 border border-gray-400 focus:outline-none rounded-md focus:ring-1 ring-cyan-500" />
<input type="text" placeholder="Pasword" class="mb-3 py-3 px-4 border border-gray-400 focus:outline-none rounded-md focus:ring-1 ring-cyan-500" />
<button class="w-full bg-blue-500 text-white p-3 rounded-lg font-semibold text-lg">Login</button>
<a class="text-blue-400 text-center my-2">Forgot Pasword?</a>
<hr />
<button class="w-full bg-green-400 mt-8 mb-4 text-white p-3 rounded-lg font-semibold text-lg">Create New Account</button>
</form>
<p class="text-center text-sm my-4">
<span class="font-semibold text-center w-full">Create a Page</span> for a celebrity, band or business
</p>
</div>
</div>
How to make a Facebook Login Page with Tailwind CSS?
Install tailwind css of verion 2.0.2
Use the script
html tag to import the script of Tailwind CSS of the version 2.0.2
<script src="https://cdn.tailwindcss.com"></script>
All the unility class needed to make a Facebook Login Page component
p-20
h-screen
w-screen
flex
flex-col-reverse
md:flex-row
bg-gray-200
text-3xl
text-center
md:text-left
text-5xl
text-blue-500
mx-auto
flex-col
w-80
p-4
bg-white
mb-3
py-3
px-4
border-gray-400
w-full
bg-blue-500
text-white
p-3
text-lg
text-blue-400
my-2
bg-green-400
mt-8
mb-4
text-sm
my-4
33 steps to make a Facebook Login Page component with Tailwind CSS
Control the padding on all sides of an element to 5rem using the
p-20
utilities.Use
h-screen
to make an element span the entire height of the viewport.Use
w-screen
to make an element span the entire width of the viewport.Use
flex
to create a block-level flex container.Use
flex
to create a block-level flex container.Use
flex
to create a block-level flex container at only medium screen sizes.Control the background color of an element to gray-200 using the
bg-gray-200
utilities.Control the text color of an element to 3xl using the
text-3xl
utilities.Control the text color of an element to center using the
text-center
utilities.Control the text color of an element to left at only medium screen sizes using the
md:text-left
utilities.Control the text color of an element to 5xl using the
text-5xl
utilities.Control the text color of an element to blue-500 using the
text-blue-500
utilities.Control the horizontal margin of an element to auto using the
mx-auto
utilities.Use
flex
to create a block-level flex container.Use
w-80
to set an element to a fixed width(20rem).Control the padding on all sides of an element to 1rem using the
p-4
utilities.Control the background color of an element to white using the
bg-white
utilities.Control the margin on bottom side of an element to 0.75rem using the
mb-3
utilities.Control the vertical padding of an element to 0.75rem using the
py-3
utilities.Control the horizontal padding of an element to 1rem using the
px-4
utilities.Control the border color of an element to gray-400 using the
border-gray-400
utilities.Use
w-full
to set an element to a 100% based width.Control the background color of an element to blue-500 using the
bg-blue-500
utilities.Control the text color of an element to white using the
text-white
utilities.Control the padding on all sides of an element to 0.75rem using the
p-3
utilities.Control the text color of an element to lg using the
text-lg
utilities.Control the text color of an element to blue-400 using the
text-blue-400
utilities.Control the vertical margin of an element to 0.5rem using the
my-2
utilities.Control the background color of an element to green-400 using the
bg-green-400
utilities.Control the margin on top side of an element to 2rem using the
mt-8
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 sm using the
text-sm
utilities.Control the vertical margin of an element to 1rem using the
my-4
utilities.
Conclusion
The above is a step-by-step tutorial on how to use Tailwind CSS to make a Facebook Login Page components, learn and follow along to implement your own components.