Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

tailwind install nextjs

//Code from Tailwind docs - https://tailwindcss.com/docs/guides/nextjs

//Terminal - Start your project
npx create-next-app my-project
cd my-project

//Terminal - Install Tailwind
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p

//Create tailwind.config.js
module.exports = {
  content: [
    "./pages/**/*.{js,ts,jsx,tsx}",
    "./components/**/*.{js,ts,jsx,tsx}",
  ],
  theme: {
    extend: {},
  },
  plugins: [],
}

//Add Tailwind to your globals.css file
@tailwind base;
@tailwind components;
@tailwind utilities;

//Terminal - Initiate your project
npm run dev

//START USING TAILWIND!
export default function ExampleComponent() {
  return (
    <h1 className="text-3xl font-bold underline">
      Hello from Tailwind!
    </h1>
  )
}

//Extra - Install Tailwind Intellisense from VS Code for
//an amazing experience!
Comment

next js with tailwind css

npx create-next-app -e with-tailwindcss pName
Comment

tailwindcss nextjs setup

npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p

// Remember to add to tailwind.config.js

/** @type {import('tailwindcss').Config} */ 
module.exports = {
  content: [
    "./pages/**/*.{js,ts,jsx,tsx}",
    "./components/**/*.{js,ts,jsx,tsx}",
  ],
  theme: {
    extend: {},
  },
  plugins: [],
}

// and to globals.css

@tailwind base;
@tailwind components;
@tailwind utilities;
Comment

next js with tailwind css

npx create-next-app -e with-tailwindcss projectname
//this will create your nextjs application and integrate JIT engine and Tailwind-CSS in it.
Comment

install tailwind css with next js

Create nextjs app with tail wind
Comment

PREVIOUS NEXT
Code Example
Javascript :: chart.js 
Javascript :: type conversion in javascript 
Javascript :: nodejs debug 
Javascript :: react portal example 
Javascript :: convert excel file to json using node js 
Javascript :: sort an array 
Javascript :: javascript exeit from loop 
Javascript :: why we use $ in jquery 
Javascript :: javascrip functions parameters 
Javascript :: scrollbar position 
Javascript :: discord.js lock channel 
Javascript :: create file node 
Javascript :: javscript async function 
Javascript :: react -native-config 
Javascript :: es6 hashset 
Javascript :: how to clear radio field in jquery 
Javascript :: arrow function syntax vs function expression syntax 
Javascript :: initiate node js app 
Javascript :: how to name a file path in document.geteleementbyid 
Javascript :: amazon s3 upload error ssl certificate 
Javascript :: reverse array recursion javascript 
Javascript :: validate firstname in javascript 
Javascript :: update password before saving to mongodb 
Javascript :: Check if a number is even or odd 
Javascript :: declaring variable react hooks 
Javascript :: javaScript Age in Dog years //write a function that takes your age and returns it to you in dog years - they say that 1 human year is equal to seven dog years function dog Years() javaScript 
Python :: cv2_imshow colab 
Python :: suppress pandas future warnings 
Python :: transform size of picture pygame 
Python :: python open web browser 
ADD CONTENT
Topic
Content
Source link
Name
6+9 =