Skip to content
  • Learning paths
  • Challenges
  • Solutions
  • Articles
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 1 year ago

Dropdown Navbar and main section using Material UI

react, material-ui
Raza Abbas•770
@RazaAbbas62
A solution to the Intro section with dropdown navigation challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)
Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Petrit Nuredini•2,860
    @petritnuredini
    Posted over 1 year ago

    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
  • Theunis•210
    @theYuun
    Posted over 1 year ago

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

    Marked as helpful

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
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub