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

Dropdown Navbar and main section using Material UI

Raza Abbas 790

@RazaAbbas62

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

Community feedback

@petritnuredini

Posted

Congratulations on completing your project! It's great to see your hard work and dedication. Here are a few suggestions to enhance your project:

  1. Consistent Styling for React Components:

    • In your NavBar, DesktopNav, and MobileNav components, you are using both inline styles with sx prop and external CSS. It's recommended to stick to one styling method to maintain consistency and readability. If you prefer MUI's styling solution, consider using it across all components. For more on styling in MUI, check out this guide.
  2. Code Duplication and State Management:

    • In DesktopNav and MobileNav, there's some repeated code for handling menu states (handleMenuOpen, closeMenu, etc.). You can create a custom hook or a higher-order component to manage this shared state and logic to make your code DRY (Don't Repeat Yourself). This article on custom hooks might help.
  3. Accessibility and Semantic HTML:

    • For better accessibility, ensure that interactive elements like buttons are used instead of non-interactive elements for actions. Also, use semantic HTML elements where appropriate for better accessibility and SEO. The <Typography> component should use the component prop to render the correct HTML element, like <Typography variant="h1" component="h1">. Learn more about accessibility here.

Keep up the fantastic work! Remember, every project is a step forward in your development journey. Continuous learning and improvement are key to becoming an excellent developer. I'm excited to see what you'll create next! 💻🌟

Marked as helpful

0
Theunis 210

@theYuun

Posted

Very cool, but have a look at the company logos below the Learn More button. They're a bit streched.

Marked as helpful

0

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