Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted 3 months ago

Easybank landing page with React and Tailwind CSS

react, tailwind-css, motion
apu2304•260
@apu2304
A solution to the Digital bank landing page 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

  • P
    Nishanth Venkatesan•1,030
    @nishanth1596
    Posted 3 months ago

    Hi @apu2304, Great work, the transisiton and translation for the nav was really cool! 👏

    Here are a few suggestions you might find helpful:

    1. In the App component, I noticed some components are named like Section1, Section2, and Section3. When another developer (or even you after a few weeks) reads it, it may not be immediately clear what each section does. It's better to give meaningful names like HeroSection for the landing section, WhyChooseUs or FeaturesSection for the features part, etc. Meaningful names really improve readability and keep the project structure clean.

    2. In the Nav component (great naming here btw 👏), you repeated the same animated <motion.p> element multiple times. Instead, you could map over an array of links, like this:

    {navLinks.map((link) => (
      <motion.p
        key={link}
        initial={{ borderBottom: "none", borderColor: "transparent" }}
        whileHover={{
          borderBottom: "3px solid",
          borderColor: "var(--emerald)",
          color: "var(--space-cadet)",
        }}
        transition={{ duration: 0.5, ease: "easeInOut" }}
        className="text-[var(--cadet-gray)] cursor-pointer"
      >
        {link}
      </motion.p>
    ))}
    

    It makes the code more scalable and maintainable. (And honestly, as developers, we're a little lazy 😝 — DRY code saves us pain later!)

    1. In Section1, Section2, and the Nav component, you used a lot of <div>s. It would be even better to use semantic HTML tags where possible, like <section> for sections and <nav> for the navigation bar. You can look into semantic HTML a bit more — it’s a small change that improves accessibility and SEO, and it's a great habit to develop.

    2. In section 2, you could create one component and reuse it by passing different props.

    function CardItem({ title, description }) {
      return (
        <article
          className="bg-[var(--lightblue)] p-4 rounded-lg flex flex-col gap-4 mb-8 justify-center items-center
    md:items-start text-center md:text-left"
        >
          <img src="assets/images/icon-onboarding.svg" alt="" />
          <h2 className="text-[var(--space-cadet)] text-lg md:text-xl">{title}</h2>
          <p className="text-[var(--cadet-gray)] text-sm md:text-md max-w-lg">
            {description}
          </p>
        </article>
      );
    }
    
    export default CardItem;
    

    That way, your code becomes even cleaner and more scalable, which is a big advantage of frameworks like React. Also the another big advantage is you dont have to write more code, coz we developers are lazy 😂

    Keep up the awesome work! 🚀 Your project already looks great, and with these small improvements, it'll look even more professional. ✨

    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

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

How does the accessibility report work?

When a solution is submitted, we use axe-core to run an automated audit of your code.

This picks out common accessibility issues like not using semantic HTML and not having proper heading hierarchies, among others.

This automated audit is fairly surface level, so we encourage to you review the project and code in more detail with accessibility best practices in mind.

How does the CSS report work?

When a solution is submitted, we use stylelint to run an automated check on the CSS code.

We've added some of our own linting rules based on recommended best practices. These rules are prefixed with frontend-mentor/ which you'll see at the top of each issue in the report.

The report will audit all CSS, SCSS and Less files in your repository.

How does the HTML validation report work?

When a solution is submitted, we use html-validate to run an automated check on the HTML code.

The report picks out common HTML issues such as not using headings within section elements and incorrect nesting of elements, among others.

Note that the report can pick up “invalid” attributes, which some frameworks automatically add to the HTML. These attributes are crucial for how the frameworks function, although they’re technically not valid HTML. As such, some projects can show up with many HTML validation errors, which are benign and are a necessary part of the framework.

How does the JavaScript validation report work?

When a solution is submitted, we use eslint to run an automated check on the JavaScript code.

The report picks out common JavaScript issues such as not using semicolons and using var instead of let or const, among others.

The report will audit all JS and JSX files in your repository. We currently do not support Typescript or other frontend frameworks.

Oops! 😬

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

Log in with GitHub