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

Nuxt3 + Tailwind CSS ( Qr Code )

nuxt, tailwind-css, typescript
dimar hanung•560
@dimar-hanung
A solution to the QR code component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Hello everyone,

I'd like to ask some questions related to the challenges I'm facing with complex components in my TailwindCSS and Nuxt 3 project. Your advice and insights would be greatly appreciated:

  1. How can one optimize the use of classes in TailwindCSS when dealing with Complex components?

  2. Is there a better approach to combining classes and TailwindCSS, as illustrated in the provided examples?

    • Example 1
    class="h-full xs:h-auto grid place-items-center shadow-xl hover:shadow-2xl transition-shadow w-full max-w-[320px] bg-white px-4 pt-4 pb-10 xs:rounded-[20px]"
    
    • Example 2
    .desc {
    font-family: "Outfit", sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 15px;
    line-height: 19px;
    text-align: center;
    letter-spacing: 0.1875px;
    color: #7d889e;
    }
    
    • Example 3
    .decoration-oval {
    @apply rounded-full absolute;
    
        width: 270px;
        height: 270px;
        transition: all ease 0.3s;
        background: #3685ff;
        }
    
    • Example 1: Long class (directly within the HTML element)\
    • Example 2: Defining a class (considered best but inconsistent)\
    • Example 3: Combination of class and Tailwind (also inconsistent)
      Are there other ways to address the shortcomings in each provided example?
  3. How can one ensure consistency when using TailwindCSS?

  4. Are there any recommendations or guidelines on best practices when using TailwindCSS, especially when it comes to more complex components?

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on dimar hanung's solution.

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