Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

create react app typescript tailwind template

npx create-react-app app --template typescript

cd app

npm install -D tailwindcss postcss autoprefixer

npx tailwindcss init -p

// Next open up the created "tailwind.config.js" file and add the following to "content":
content: [
    './src/**/*.{js,jsx,ts,tsx}',
],
  
// Next we need to add the Tailwind directives to the "src/index.css" file, add the following to the top of the file:
@tailwind base;
@tailwind components;
@tailwind utilities;
 
PREVIOUS NEXT
Tagged: #create #react #app #typescript #tailwind #template
ADD COMMENT
Topic
Name
1+6 =