Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

tailwind 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

PREVIOUS NEXT
Code Example
Javascript :: create hash password in js 
Javascript :: mongoose virtual populate not working 
Javascript :: detect chrome version javascript 
Javascript :: make string json object vue 
Javascript :: your mom is your dad 
Javascript :: remove falsy value javascript 
Javascript :: diffrence b/w render and reload 
Javascript :: javascript add alpha to hex 
Javascript :: p5js class 
Javascript :: how to place a line break in react native 
Javascript :: jquery this value 
Javascript :: remove add event listener jquery 
Javascript :: find difference in array of objects javascript 
Javascript :: angular copy 
Javascript :: get value of datalist javascript 
Javascript :: align text in js 
Javascript :: owl-carouselslide vertical 
Javascript :: how to disable mouse right click in html page 
Javascript :: rn push notification No task registered for key ReactNativeFirebaseMessagingHeadlessTask 
Javascript :: js save session 
Javascript :: javascript upload json 
Javascript :: index.js vs main.js 
Javascript :: mongoDb Importar json para DataBase 
Javascript :: geolocation in javascript 
Javascript :: event listener for element lost focus 
Javascript :: get selected option value jquery 
Javascript :: js console log input value 
Javascript :: convert month name to month number in js 
Javascript :: public class NameOf { public static String nameof<T(Expression<Func<T name) { MemberExpression expressionBody = (MemberExpression)name.Body; return expressionBody.Member.Name; } } 
Javascript :: datatables ajax reload 
ADD CONTENT
Topic
Content
Source link
Name
7+3 =