Тёмный

Setting up Tailwind CSS in a Next.js Project 

simonswiss
Подписаться 11 тыс.
Просмотров 45 тыс.
50% 1

In this video, I'll show you how to set up Tailwind CSS in a new Next.js project.
First, we'll look at the quickest way to get started, using one of Next.js' starter examples.
After that, I'll walk you through the step-by-step manual implementation. Along the way, we'll spend some time understanding how to set up the `content` configuration properly in the Tailwind config file.
Enjoy!
Enjoying my teaching style? I'm creating an independent Tailwind CSS course called Pro Tailwind. Check it out at protailwind.com ❤️

Опубликовано:

 

5 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 56   
@azuraflame1
@azuraflame1 Год назад
Thank you this was very straight forward with no extra unnecessary material. very helpful!
@piyush9688
@piyush9688 Год назад
Thank you so much for clear instructions, I wished the official docs had this type of clear instructions.
@matiasvaldez370
@matiasvaldez370 2 года назад
Was already missing your videos! 😅
@simonswiss
@simonswiss 2 года назад
Haha, it's been a while!
@Qasimbiz
@Qasimbiz Год назад
To anyone watching the video now, his method of installation will no longer work. Run the command below and configure your project accordingly. npx create next-app --typescript
@MichaelShingo
@MichaelShingo 7 месяцев назад
so easy, even setting it up after Nextjs installation.
@codeNameMoose907
@codeNameMoose907 Год назад
This was beautifully perfect, Simon. Thank you! 🎉 You just got yourself a new subscriber! 😊
@simonswiss
@simonswiss Год назад
Thank you! Glad you enjoyed the tutorial!
@amazingchannel27
@amazingchannel27 10 месяцев назад
Excellent 🔥
@TechWrathTV
@TechWrathTV Год назад
You should add TYPE SCRIPT in the title as well as if someone wants to use JS they can use with-tailwindcss-emotion
@ahmadyovan6304
@ahmadyovan6304 Год назад
straight tutorial ever, exelent
@dragidavid
@dragidavid 2 года назад
Looking forward to the upcoming videos! 😄 been a while
@maresal4271
@maresal4271 2 года назад
Great video. Can you share your vscode configs & theme?
@japarradog
@japarradog 8 месяцев назад
🎯 Key Takeaways for quick navigation: 00:00 🚀 *Configuración rápida de Tailwind CSS en un proyecto Next.js* - Creación y configuración inicial rápida de un proyecto Next.js con Tailwind CSS. - Uso del ejemplo preconfigurado con Tailwind CSS para una integración inmediata. 01:09 🔧 *Configuración manual de Tailwind CSS en Next.js* - Pasos detallados para instalar y configurar manualmente Tailwind CSS en un proyecto Next.js. - Creación de archivos de configuración de Tailwind CSS y PostCSS. - Personalización de Tailwind CSS para adaptarse a las necesidades específicas del proyecto. 03:02 📁 *Configuración avanzada de archivos de contenido en Tailwind* - Uso de patrones globales para simplificar la configuración de archivos de contenido en Tailwind CSS. - Explicación sobre cómo incluir múltiples extensiones de archivos y directorios en la configuración de Tailwind. 04:12 ✨ *Aplicación de Tailwind CSS en el proyecto* - Implementación de las directivas de Tailwind CSS en el archivo CSS global. - Demostración de la aplicación de utilidades de Tailwind CSS en una página de ejemplo. Made with HARPA AI
@assiajeanngoran4601
@assiajeanngoran4601 Год назад
Good video Simon. Thks ! Please what is your vs code font 😁 i found it very cool 😊👌🏽
@simonswiss
@simonswiss Год назад
It's called Dank Mono ✨
@ronakfuntimes
@ronakfuntimes 10 месяцев назад
Thank you !
@simonswiss
@simonswiss 10 месяцев назад
You're welcome!
@rishiyadav5362
@rishiyadav5362 Год назад
Thank you for this sir
@catreunion
@catreunion 2 года назад
Thank you Simon 🙏🏻
@simonswiss
@simonswiss 2 года назад
You're welcome!
@dominuskelvin
@dominuskelvin 2 года назад
Another great one!
@simonswiss
@simonswiss 2 года назад
🙏 I've got some more coming with different frameworks!
@dominuskelvin
@dominuskelvin 2 года назад
@@simonswiss Awesome. This is motivation for me
@eazrayildirim
@eazrayildirim 2 года назад
Great video thanks.
@TheMoviesManX
@TheMoviesManX Год назад
Thank you so much! a quick question, how do you preview your app through vscode?
@simonswiss
@simonswiss Год назад
You can use Live Preview for that: marketplace.visualstudio.com/items?itemName=ms-vscode.live-server
@sayyedaaman5719
@sayyedaaman5719 Год назад
Thank you
@juanguerra3472
@juanguerra3472 2 года назад
Manual setup didn't work for me. I need it in that way because I'm using JavaScript instead of TypeScript! Any idea? Thanks!
@simonswiss
@simonswiss 2 года назад
If the manual setup is not working for you, you're probably missing one step or doing something wrong. You can always use the `with-tailwindcss` example and change the files from TS to JS, remove the type annotations, delete the TS config, and you're good to go 👍
@justinmichael447
@justinmichael447 2 года назад
@@simonswiss please i tried doing it manually but couldn't add the directives to my css indicating error(unknown at rule @tailwind why?. i tried with-tailwindcss but installed typescript please how can i solve the error or change the typescript to javascript
@DiveIntoOpenSource
@DiveIntoOpenSource Год назад
It's just VS code settings 😌
2 года назад
I'm getting this error when I try to run dev error - ./node_modules/next/dist/client/dev/amp-dev.js Error: Cannot find module 'xwind/babel'
@rahulgoswami7503
@rahulgoswami7503 2 года назад
I'm facing the same issue🥲🥲
@aim178
@aim178 9 месяцев назад
what is name this editor it`s looks cool
@nitijjhangra8607
@nitijjhangra8607 Год назад
This is very basic. How about watching and building page specific css files?
@brandonr1288
@brandonr1288 Год назад
when I make the project I only get a readme file and a gitignore
@cmyk8964
@cmyk8964 Год назад
It’s not working. The utility classes do nothing, and Visual Studio Code doesn’t recognize “@tailwind”.
@suphawatwong9438
@suphawatwong9438 2 года назад
you forgot to mention that you need to import 'globals.css' file to '_app.tsx' file . . . .
@simonswiss
@simonswiss 2 года назад
No need to, the globals.css file already exists in the fresh new Next.js project, and it's already imported. I just change the contents of this file at the 4:13 mark in this video 👍
@yokubibnsafar7895
@yokubibnsafar7895 2 года назад
Assalomu Aleykum thanks man )
@arcosd63
@arcosd63 Год назад
It doesn't work, it just places a README document.
@vahidsediqi5638
@vahidsediqi5638 2 года назад
when i type npx create-next-app --example with-tailwindcss with-tailwindcss-app it creates nextjs app with typsctipt
@simonswiss
@simonswiss 2 года назад
Yep, the Tailwind CSS example uses TypeScript. If I want a project without TypeScript, I find myself doing the "manual" install, which still only takes a minute or so.
@mrattitude4759
@mrattitude4759 2 года назад
grid utilities are not working can you please help
@simonswiss
@simonswiss 2 года назад
Hard to help on a RU-vid comment. Can you create a Tailwind Play showing what doesn't work, and share the link? I'll take a look!
@Jeffrey7P
@Jeffrey7P 2 года назад
I've been trying to upgrade ever since v3 was released and didn't work. Had success with new builds but couldn't make it work with storybook because of JIT. I'm now reattempting to upgrade on another project and it seems only tailwind utilities work. Is anybody else experiencing the same issue?
@simonswiss
@simonswiss 2 года назад
Make sure the path to Storybook's stories (and file extensions!) are set up properly in your content array. 99.999% of JIT issues are due to a wrong content configuration.
@Jeffrey7P
@Jeffrey7P 2 года назад
@@simonswiss purge path location was working on v2, when transitioned to v3 only utilities worked. Thanks for the response
@proteus1
@proteus1 2 года назад
I just can't tailwind to work and i've been try to install it for 5 days. I just does nothing with the html...Can you help?
@dyslexicunt
@dyslexicunt 2 года назад
What's your project setup?
@proteus1
@proteus1 2 года назад
I have visual studio running on a Mac. For some bizarre reason, this reply was sent to me today. Good old UT
@dyslexicunt
@dyslexicunt 2 года назад
@@proteus1 - Did you get it working?
@proteus1
@proteus1 2 года назад
@@dyslexicunt I followed a video that showed installation line by line, but still didn't work. I made sure I had node is latest version, did the npm stuff. Still issues. Do you use Mac or PC?
@The_Awakened_Hybrid
@The_Awakened_Hybrid Год назад
GREAT content bro, thanks man. BTW, I ain't even gay man, but damn, you're a handsome dude! Must be all that VIKING DNA over there in Northern Europe! Victory OR Valhalla! SKOL my NORDIC brothers, let's march and bring the BEARSERKERS, we are gonna party with the hot village chix! ahahaha
@sexy_audios
@sexy_audios Год назад
How to install this with javascript? not typescript
Далее
Women’s Free Kicks + Men’s 😳🚀
00:20
Просмотров 7 млн
Women’s Celebrations + Men’s 😮‍💨
00:20
Setting up Tailwind CSS in a Laravel Project
4:50
Просмотров 20 тыс.
Build any layout with tailwind | crash course
34:28
Просмотров 83 тыс.
Build Apps Faster with daisyUI Tailwind Components
7:43
How to Setup Tailwind CSS in React JS?
5:03
Просмотров 60 тыс.
Why aren't you using Fastify? Or Koa? Or NestJS?
9:58
Women’s Free Kicks + Men’s 😳🚀
00:20
Просмотров 7 млн