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

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

install tailwind css with next js

Create nextjs app with tail wind
Comment

PREVIOUS NEXT
Code Example
Javascript :: get form response with javascript 
Javascript :: load jquery in the browser code 
Javascript :: javascript change long digit ot k,m 
Javascript :: data-dismiss= modal in jquery 
Javascript :: enable select jquery 
Javascript :: express js limit access based on rate 
Javascript :: increment day date javascript 
Javascript :: move list items up and down using javascript 
Javascript :: js get transition duration 
Javascript :: console load jquery 
Javascript :: import fa icons react 
Javascript :: jquery validate if field exists 
Javascript :: javascript simulate key press 
Javascript :: javascript set input field value 
Javascript :: how to check connected devices in react native 
Javascript :: neffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory 
Javascript :: js foreach determine if last 
Javascript :: puppeteer clear input 
Javascript :: convert base64 string to byte array javascript 
Javascript :: discord login with token 
Javascript :: get link js 
Javascript :: take data from url parameter and change using htaccess new url 
Javascript :: upgrade nodejs and npm ubuntu 
Javascript :: express js basic example 
Javascript :: javascript timestamp in seconds 
Javascript :: min max and average finder in js array 
Javascript :: columndefs in datatable not working while setting width jquery 
Javascript :: how can we redirect to third party page in angular 
Javascript :: get url query params js 
Javascript :: check if element is visible 
ADD CONTENT
Topic
Content
Source link
Name
4+1 =