@ryleigh
To extend tailwind classes in Nuxt.js, you can use the extend
option in your tailwind.config.js
file. Here's how you can do it:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
module.exports = { theme: { extend: { colors: { 'custom-color': '#123456', }, fontFamily: { sans: ['Inter', 'sans-serif'], serif: ['Playfair Display', 'serif'], }, fontSize: { '7xl': '5rem', }, // Add custom classes extend: { // Use utility function to generate classes form: { 'input': 'form-input', 'label': 'form-label', }, }, }, }, }; |
After following these steps, you should be able to use your custom classes and modified tailwind classes in your Nuxt.js project. Remember to refer to the official Tailwind documentation for more options and configurations that you can use to extend tailwind classes.