DEV Community

Usama
Usama

Posted on

🌌 Today I Built and Improved My First Form UI

Hey developers! 👋
Today was a really productive day — I finally learned how to create forms in React and gave my existing UI a fresh, modern touch. I also fixed a tricky issue that had been bothering me for a while. Here’s a quick breakdown of what I achieved 👇


🧠 What I Learned

How to build a simple yet functional form component in React (

with and ).

How to manage dropdowns properly (like handling 1–20 item selection).

How to add a glassmorphism effect to my elements using CSS (backdrop-filter, rgba, and subtle shadows).

How to make scrollbars modern and minimal using pure CSS — no external libraries.


⚙️ The Problem I Fixed

While working on my form, I noticed a weird behavior:

Every time I clicked outside and then back inside my , the dropdown would expand abnormally — sometimes even overflowing the entire page! 😅

After testing and debugging, I discovered it was caused by CSS transforms and z-index stacking context issues.
By resetting these properties and ensuring no parent elements applied scaling transforms, I managed to fix the glitch completely. ✅


🎨 UI Improvements

I also upgraded the design with:

A soft glass effect using backdrop-filter: blur(8px);

Smooth, modern scrollbars

Hover and focus animations for better UX

Subtle borders and rounded corners for a modern touch

Here’s a quick snippet of the updated select style:

select {
background: rgba(255, 255, 255, 0.2);
backdrop-filter: blur(8px);
border: 1.5px solid rgba(255, 255, 255, 0.3);
border-radius: 10px;
padding: 1rem 2rem;
color: #fff;
font-weight: 600;
transition: all 0.3s ease;
}


💡 Takeaway

Sometimes, even a small UI bug can teach you a lot about CSS behavior and browser rendering.
I’m starting to understand how front-end details — spacing, layering, and transitions — all come together to make a UI feel alive.


🔮 What’s Next

Tomorrow, I plan to:

Add input validation

Practice handling form submissions in React

Keep refining my CSS and UI components


Thanks for reading! 🙌
If you’ve ever faced weird dropdown or layout bugs, I’d love to hear how you fixed them.

Top comments (4)

Collapse
 
varshithvhegde profile image
Varshith V Hegde

I always get issues with z index like if I add z index to one component and my whole css will start acting weird🫠

Collapse
 
usama_dev profile image
Usama

Z-index is like dark magic — works only when you don’t try to understand it 🧙‍♂️

Collapse
 
coffeejuseyo profile image
coffeejuseyo

Keep on going!

Collapse
 
random_ti profile image
Random

Good Work Bro, Keep it up👍