Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

ReactJS TailwindCSS Vite CSS Dropdown Menu Intro Website Challenge

lavollmer 350

@lavollmer

Desktop design screenshot for the Intro section with dropdown navigation coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


What are you most proud of, and what would you do differently next time?

I am very proud of the mobile responsive and desktop layouts. Additionally, my dropdown menus turned out great and are easy to use.

Next time, I would focus more on understanding the flexbox layout for the desktop navigation bar.

What challenges did you encounter, and how did you overcome them?

  1. Extension of TailwindCSS Config File: Throughout this project, my proficiency in utilizing TailwindCSS for custom styling significantly improved. I learned more about extending Tailwind's default theme to include project-specific colors, font sizes, and fonts. This was crucial for aligning the website's design with the predefined style guide. An example of this customization involved adding unique color schemes, adjusting font sizes for readability, and incorporating a custom font family, 'Epilogue', directly into Tailwind's configuration.

  2. Extending Background Color with Tailwind CSS: To ensure the background color stretches to the bottom of the page, I applied the min-h-screen class to the main in the App component. This approach guarantees that the covers at least the full height of the viewport, allowing the background color to fill the entire visible area, independent of content height.

  3. Implementing Sidebar Navigation: Developing the sidebar navigation was a significant learning experience. I utilized React's useState to manage the sidebar's visibility, toggling between open and closed states upon interacting with the hamburger icon. For the mobile version, I positioned the hamburger icon at the top right, ensuring it animates in response to changes in width.

  4. Dropdown Menu for Mobile Layout: For the Features section, I crafted a dropdown menu, managing its visibility through state control and an onClick event handler. TailwindCSS styling was essential, ensuring the dropdown was both visually appealing and functional.

  5. Responsive Design with Media Queries: My understanding of media queries grew, particularly in making the navigation sidebar responsive. By assigning specific class names to the mobile layout and using media queries, I successfully hid the sidebar on desktop screens, applying similar strategies for mobile visibility.

  6. **Understanding Tags**: I discovered that tags are void elements, meaning they cannot contain child elements and only accept attributes. This realization came while debugging an issue related to this constraint.

  7. Grid Layout with TailwindCSS: I implemented a two-part grid container using ReactJS for the desktop layout, positioning the image and text content effectively. This structure was pivotal in achieving a balanced and engaging layout.

  8. Flexbox Fundamentals: My project experience enriched my understanding of flexbox, from basic flex properties to more complex configurations like flex-row and justify-between. These insights were invaluable in optimizing the layout and alignment of website elements.

  9. Enhancing Interactivity with Hover States: Adding hover states to buttons and text elements was my final task, where I leveraged TailwindCSS for animation and color transitions. This enhancement significantly improved the user interface, making interactive elements more engaging.

What specific areas of your project would you like help with?

I would like help on how to use justify-between for the desktop navigation bar. I was able to get the navigation bar to look very good but wasn't able to get justify-between to work perfectly. Thanks!

Community feedback

Please log in to post a comment

Log in with GitHub
Discord logo

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord