- add the CDN into your
index.html
file
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500&display=swap" rel="stylesheet">
- Edit
tailwind.config.js
to include the following:
module.exports = {
theme: {
extend: {
fontFamily: {
poppins: ["Poppins", "sans-serif"],
},
},
},
// ... other configurations
};
- Use in your component
<div className="font-poppins">
This text uses the Poppins font
</div>