Site icon FSIBLOG

How to Make a Sign Up Form Using React JS & Tailwind CSS

How to Make a Sign Up Form Using React JS & Tailwind CSS

How to Make a Sign Up Form Using React JS & Tailwind CSS

let me walk you through this project I recently crafted for a client sleek and user friendly sign-up page built with React JS and Tailwind CSS.

Overall Layout

I began with a full-screen container to center the form both vertically and horizontally. It looks like this:

<div className="min-h-screen flex items-center justify-center bg-gray-200">

Main Container

Next, I created a container to house both the form and the right-side illustration:

<div className="flex w-[900px] shadow-2xl rounded-2xl overflow-hidden">

Left Panel – The Form

Branding and Title

I used the brand name dotworker and a welcoming header:

<div className="text-blue-600 font-bold text-xl mb-6">dotworker</div>
<h2 className="text-2xl font-semibold mb-6">Create your Account</h2>

Social Login Button

To make the sign-up process quicker, I added placeholder social buttons (ideal for future integration with Firebase/Auth0):

<button>Google</button>
<button>Facebook</button>

Each is styled with borders and icons for easy recognition.

The Email & Password Form

This form is clean, straightforward, and ready to go:

<form>
<input type="email" />
<input type="password" />
...
</form>

I included:

Right Panel

The right section uses a blue background and features brand icons and a visual dashboard mock:

<div className="w-1/2 bg-blue-600 text-white ...">

Let Add Real Functionality

I wanted the form to do more than just look good it had to work. So I added:

React State Handling

const [email, setEmail] = useState("");
const [password, setPassword] = useState("");
const [remember, setRemember] = useState(false);
const [showPassword, setShowPassword] = useState(false);
const [error, setError] = useState("");

I used React JS useState to control form input, visibility, and error messaging.

Password Visibility Toggle

I added a simple feature that toggles password visibility a small UX upgrade that users love:

type={showPassword ? "text" : "password"}

Validation and Feedback

In the handleSubmit function, I checked if fields were empty and displayed error messages dynamically:

if (!email || !password) {
setError("Please enter both email and password.");
return;
}

On successful submit, I simply displayed an alert for now, but in production this could route to an API or Firebase.

Final Thoughts

This project started as a UI challenge, but I wanted it to go beyond pretty visuals. I gave it purpose. I added interactivity and validation so the client could see the product in action not just in pixels, but in functionality.

What made this exciting was how quickly I could bring it to life with Tailwind CSS and React. The ability to manage UI state, build custom components, and create polished UI all in one component is what makes React such a powerful tool.

Exit mobile version