Skip to content

Instantly share code, notes, and snippets.

@codewithleader
Created November 7, 2023 04:38
Show Gist options
  • Save codewithleader/0ffc713eafdd9eaec6fbb99133dc8ed5 to your computer and use it in GitHub Desktop.
Save codewithleader/0ffc713eafdd9eaec6fbb99133dc8ed5 to your computer and use it in GitHub Desktop.
Tailwindcss - Configuración en React y VueJS

Pasos para instalar Tailwindcss

  1. npm i -D tailwindcss postcss autoprefixer: Instala las dependencias necesarias.
  2. npx tailwindcss init -p: Crea los archivos de configuracion.
  3. Configurar archivo tailwind.config.js:
  • Para VueJS:
/** @type {import('tailwindcss').Config} */
export default {
  content: ['./index.html', './src/**/*.{vue,js,jsx,ts,tsx}'], // Para Vue, Si es React omitir ese
  theme: {
    extend: {},
  },
  plugins: [],
};
  • Para ReactJS:
/** @type {import('tailwindcss').Config} */
export default {
  content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'],
  theme: {
    extend: {},
  },
  plugins: [],
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment