Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

install 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

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

PREVIOUS NEXT
Code Example
Javascript :: select option trigger in js 
Javascript :: regular expression number from 1 to 100 
Javascript :: how to check chrome version in js 
Javascript :: find the unused npm modules 
Javascript :: select all checkboxes jquery 
Javascript :: array traversal backward 
Javascript :: delete slash commands discord.js 
Javascript :: reactjs download file axios 
Javascript :: minecraft infinite snapshot dimensions 
Javascript :: how to get the current date and time in javascript 
Javascript :: sendgrid nodejs send email template 
Javascript :: graphql disable cache 
Javascript :: indexof case insensitive javascript 
Javascript :: react map 
Javascript :: mongodb create database with username and password 
Javascript :: create folder by commend line 
Javascript :: how to check if an element is in an array javascript 
Javascript :: declare * angular jquery 
Javascript :: convert base64 to uint8array javascript 
Javascript :: observable.create is deprecated 
Javascript :: js json upload 
Javascript :: rectbutton disable 
Javascript :: react setupproxy 
Javascript :: character to ascii in js 
Javascript :: scrollview react native 
Javascript :: geolocation async js 
Javascript :: js regex last occurrence 
Javascript :: convert json string to javascript object 
Javascript :: tab navigation react-native without title 
Javascript :: javascript fetch post form data 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =