npx create-next-app@latest <name-of-project> --javascript --eslintnpm install -D tailwindcss postcss autoprefixernpx tailwindcss init -pIn tailwinds.config.js
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./app/**/*.{js,ts,jsx,tsx}",
"./pages/**/*.{js,ts,jsx,tsx}",
"./components/**/*.{js,ts,jsx,tsx}",
// Or if using `src` directory:
"./src/**/*.{js,ts,jsx,tsx}",
],
theme: {
extend: {},
},
plugins: [],
}
In styles/globals.css
@tailwind base;
@tailwind components;
@tailwind utilities;
pages/index.js
HeadCreate a proof of life
<h1 className='text-3xl font-bold underline'>Hello World</h1>
npm run dev to start the server
headermainfooterTo create links to new pages
import Link from 'next/link`
<Link href='linktopage'>Link Display Name</Link>
pages, create a new js file: pageName.js
careers.jsjs file, write your functional components and links to other pagesimport Link from 'next/link`;
export default function Careers() {
return(
<div>
<h1>Careers Page Coming Soon</h2>
<Link href="/">Home</Link>
</div>
);
};
className styling with TailwindCSS as you go