홈페이지 리뉴얼을 진행하면서 tailwindCSS 를 이용해서 UI 를 구현하게 되어 정리정리
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p
/** @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: [],
}
@tailwind base;
@tailwind components;
@tailwind utilities;
npm run dev
export default function Home() {
return (
<h1 className="text-3xl font-bold underline">
Hello world!
</h1>
)
}
💡 tailwindCSS 를 설치하고 className 을 작성해도 적용이 안되서 뭐가 문젠지 한참 찾았는데 VSC 를 껐다가 키니까 잘 적용됐다.. 혹시 특별히 잘못된 부분을 찾을 수 없을때는 껐다 켜보기.. 꼬옥..
💡 tailwind intellisense 추천추천