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

PREVIOUS NEXT
Code Example
Javascript :: how to get aria expanded value in javascript 
Javascript :: focus input field in modal 
Javascript :: generate random otp in node js 
Javascript :: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON 
Javascript :: mongoose count documents 
Javascript :: query injection nestjs 
Javascript :: create text editor with react-redux 
Javascript :: get previous url javascript 
Javascript :: rails is not defined javascript 
Javascript :: js datetime now 
Javascript :: es6 foreach 
Javascript :: react jsx style with calc 
Javascript :: YT.Player is not a constructor 
Javascript :: javascript work out age from date of birth 
Javascript :: confirm before leaving page javascript 
Javascript :: base64 PayloadTooLargeError: request entity too large 
Javascript :: how to take an element out of an array in javascript 
Javascript :: insert value to html input with javascript variable 
Javascript :: jquery watch checkbox change 
Javascript :: edit onclick event 
Javascript :: javascript json upload 
Javascript :: mongodb pull multiple 
Javascript :: javascript read xlsx file 
Javascript :: how to align placeholder in react native 
Javascript :: how to hide all fo the paragraphs in jquery 
Javascript :: email validation regex 
Javascript :: get nearest multiple of a number javascript 
Javascript :: save list of dictionaries to json python 
Javascript :: jest check array of string 
Javascript :: javascript get name of element 
ADD CONTENT
Topic
Content
Source link
Name
9+5 =