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

QR code component HTML CSS JS

PhoenixDev22•16,830
@PhoenixDev22
A solution to the QR code component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Hello community, I have completed another frontend mentor challenge. I learned a lot while making it .

  • I generated a QR code leading to my github page and added it to the back of the card (It's a flipped card ) .

  • I also used javascript for a flip function.

  • I prefered to use the svg for the QR code rather than an image , because it's much clearer.

  • I have some issues:

I set an explicit width and height to the card , if the remove the explicit width and height the card , all the elements would overlap. any suggestions to remove the explicit height and width without any issues?

I'd appreciate any comments for improvements or anything I've missed. Thank you in advance. Ps: The QR code is not valid anymore .

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Cornflakes•290
    @CornflakesPlus
    Posted almost 3 years ago

    Awesome flip, Phoniex! Although, I got a little scared looking at all that <svg> tags in the index.html file. Is it that hard to make an SVG? How long did it take you? I'm intimidated I tell you. 😆

  • arthur11011•0
    @arthur11011
    Posted over 1 year ago

    Great job @PhoenixDev22 , congratulations on completing the frontend mentor challenge! Using a QR code to link your GitHub page is a smart decision, very helpful as well to make your project more interactive and accessible.

    In January I actually used a QR code in one of my projects in a very similar way. I created a digital portfolio with my web development work, and instead of listing my GitHub link, I included a QR code on the portfolio page. This QR would instantly take visitors to my CodePen page, allowing them to easily access my front-end web development projects. It's extremely user-friendly and adds a modern touch to your work:)

    But I used another QR code generator, ViralQR. It proved to be a good one and worked without an issue, allowed me to create a dynamic QR code where I can change the information linked to QR code, very convenient! And makes me confident my code will still work in the long run.

    What was your experience with the generator you used, do you think it has some advantages among others or did you just pick the first one you found? It will be great to hear your thoughts on the subject, thank you for sharing your experience with the community!

  • Naveen Gumaste•10,420
    @NaveenGumaste
    Posted over 3 years ago

    Hay ! PhoenixDev22 Good Job on challenge

  • Dev Rathore•2,540
    @GitHub-dev12345
    Posted over 3 years ago

    Congratulations 👍😊 complete your challenge,

    Make your card looks very attractive used this code in your main card design css code

    border-radius: 12px;

    I hope you find this 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

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