Responsive Social Profile Card (Using ReactJS + Vite with TailwindCSS)

Solution retrospective
Im proud that I'm able to build it around 30 minutes and I think I should improve my semantics setup and on how I can make it more responsive.
What challenges did you encounter, and how did you overcome them?My challenge is that I have spent more time in figuring out the font-letter sizing and I tried using font clamp and saw that there is a setup that it is 14px that's why I based on that to build the following font-size.
What specific areas of your project would you like help with?I'm still wondering on how to make responsive designs specially using the md: sm:, and the font(clamp) tool, also I think my semantics setup are still that not good. Feel free to suggest some improvements.
Please log in to post a comment
Log in with GitHubCommunity feedback
- P@ttsoares
Neat solution !
Some comments:
-
Has, the design, a defined font family ? In my browser it been used a default one.
-
It is good practice to specify colors first and then apply them where is needed, to avoid hardcoded like this
bg-[#1F1F1F]
. -
To improve responsiveness we use REMs or EMs. So, instead of
min-h-[450px]
this:min-h-[33.75rem]
witch is 450/16. -
This approach of calling the styles from a CSS file is a bit odd for the Tailwind ways.
button { @apply bg-[#333333] rounded-md w-full text-sm p-2 font-semibold hover:bg-[#C5F829] hover:text-black transition-colors duration-300 hover:cursor-pointer; }
Instead Tailwind sugget to apply thise classes in the .JSX file:
<button className="bg-[#333333] rounded-md w-full text-sm p-2 font-semibold hover:bg-[#C5F829] hover:text-black transition-colors duration-300 hover:cursor-pointer"> Twitter </button>
But, in this case that would result in a lot of ugly repetitions. So, React style, you could create a button component:
const Button = ({ children, url }) => { const handleClick = () => { if (url) { window.open(url, '_blank'); } }; return ( <button onClick={handleClick} className="bg-[#333333] rounded-md w-full text-sm p-2 font-semibold hover:bg-[#C5F829] hover:text-black transition-colors duration-300 hover:cursor-pointer text-white" > {children} </button> ); };
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