This is a solution to the Insure landing page challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Users should be able to:
- View the optimal layout for the site depending on their device's screen size
- See hover states for all interactive elements on the page
- Solution URL: source code
- Live Site URL: Add live URL here
- Semantic HTML5 markup
- Flexbox
- CSS Grid
- Mobile-first workflow
- React - JS library
- tailwindcss - A CSS framework
- vite - A Next Generation Frontend Tooling
- Adding classes conditionally in
react
. There are various ways to do this, but my preferred was the method below. As you can see it uses the logical operator. This is much cleaner and concise
const className = ["class1", "class2", condition && "class3"];
- Add CSS Classes Conditionally in React - This helped me ina adding classes conditionally in react. I really liked this pattern and will use it going forward.
- Adding custom styles in tailwindcss using arbitrary values - This allowed me to use css pseudo-classes with tailwind
- Website - Silvanos Eric
- Frontend Mentor - @codexshell
- Twitter - @codexshell