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 (2)

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 ๐Ÿง™โ€โ™‚๏ธ