Тёмный

Using NextUI Components & Themes in NextJs 

Hamed Bahram
Подписаться 100 тыс.
Просмотров 44 тыс.
50% 1

In this video, we'll look at setting up the NextUI library in the App router in NextJs 13. We'll build a product card using server components with three different themes.
👉🏼 The Ultimate NextJs Course
🔗 www.hamedbahram.io/courses/ne...
👉🏼 Project source code (Github)
🔗 github.com/HamedBahram/next-ui
👉🏼 Work with me
🔗 www.hamedbahram.io/hire
Chapters
0:00 Intro
1:30 Installing the NextUI package
7:20 Using NextUI components
9:00 Setting up the theme switcher
13:40 Support for server components
14:45 Customizing themes
18:04 Outro

Наука

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

 

23 июн 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 100   
@ofttrading
@ofttrading 9 месяцев назад
I was using this library for the past years and its great so far than other libraries
@hamedbahram
@hamedbahram 9 месяцев назад
Yeah I like it too!
@rohitghodeswar11
@rohitghodeswar11 9 месяцев назад
You chose a particular subject and went into great detail. Nice job! Keep it up.
@hamedbahram
@hamedbahram 9 месяцев назад
Glad you enjoyed it!
@trusht
@trusht 9 месяцев назад
😍I wish i knew this library before i designed my dashboard past month. Forms and animations are great. Now i am tempted to redesign it all over. Hope it is easy to switch :) Thank you my friend for letting us know.
@hamedbahram
@hamedbahram 9 месяцев назад
Yeah the components are great, and I love the framer motion animations built-in. Let me know how it goes 🙂
@jamessiebert764
@jamessiebert764 8 месяцев назад
Thanks for this video, was very helpful ❤. Keep the NextUI content coming 😁
@hamedbahram
@hamedbahram 8 месяцев назад
Glad it was helpful!
@zilvinas5130
@zilvinas5130 8 месяцев назад
Thank you for this video! Following your guide I was able to fix my hydration issue on runtime.
@hamedbahram
@hamedbahram 8 месяцев назад
You're welcome! Glad it helped.
@gwemula
@gwemula 8 месяцев назад
Good stuff! Appreciate your video's format.
@hamedbahram
@hamedbahram 8 месяцев назад
Glad to hear it!
@nipun8910
@nipun8910 8 месяцев назад
Dude show us how to do it from the very begining. We are not here to listen to a podcast
@hamedbahram
@hamedbahram 8 месяцев назад
Thanks for your feedback. I'll keep that in mind for future videos.
@ZenoMinus
@ZenoMinus 5 месяцев назад
Wait, this video doesn't have thousands of likes yet? Seriously though, RU-vid's algorithm is more mysterious than my grandma's Frico recipe. Awesome content, big thumbs up! 🌟👍
@hamedbahram
@hamedbahram 5 месяцев назад
Thanks, I appreciate that!
@rockNbrain
@rockNbrain 9 месяцев назад
great jovb dude! i didn`t know about this library, tks a lot, I'm doing a side project using shadcn but this nextui has a lot more components like pagination and so on ...
@hamedbahram
@hamedbahram 9 месяцев назад
Glad I could help!
@jarnoojasaar
@jarnoojasaar 6 месяцев назад
exactly the information I needed, ty
@hamedbahram
@hamedbahram 6 месяцев назад
You're welcome! Glad to hear that!
@brennenrocks
@brennenrocks 9 месяцев назад
Because all of the components have the 'use client' does that mean that it is not possible to actually use React Server Components? We can't use NextUI and query the DB in the same component?
@hamedbahram
@hamedbahram 9 месяцев назад
Yes you can, actually because the NextUI components already have the `use client` directive you can directly import them into your server component.
@eduardocoyto2497
@eduardocoyto2497 7 месяцев назад
Thank you very much for the explanation, it is an amazing tutorial. I really like the font you use in your VS, which one is it? Greetings from Uruguay
@hamedbahram
@hamedbahram 7 месяцев назад
Glad to hear that! I'm using Operator mono.
@mactec4124
@mactec4124 3 месяца назад
Hi Hamed, I have a question, which one of these two is better (next ui or shadcn) in projects that require a lot of customization and also great visual beauty?
@hamedbahram
@hamedbahram 3 месяца назад
If you need a lot of customization the shadcn, since you have the source code.
@aryamitra.chaudhuri
@aryamitra.chaudhuri 6 месяцев назад
Super helpful video! thanks Hamed!
@hamedbahram
@hamedbahram 6 месяцев назад
My pleasure! Glad it was helpful.
@devbyali
@devbyali 8 месяцев назад
Awesome tutorial! Your explanation of using NextUIProvider , customizing themes and how to switch between them was clear and incredibly helpful. Keep up the fantastic work! 👏👍
@hamedbahram
@hamedbahram 8 месяцев назад
Glad to hear that! Thank you!
@hbela1000
@hbela1000 9 месяцев назад
Great video,thx.
@hamedbahram
@hamedbahram 9 месяцев назад
Anytime!
@user-oy5uh1qf5d
@user-oy5uh1qf5d 3 месяца назад
hey thanks for your videos! is there a way to use edit in table with nextui ?
@hamedbahram
@hamedbahram 3 месяца назад
You mean editing a column value?
@user-oy5uh1qf5d
@user-oy5uh1qf5d 3 месяца назад
@@hamedbahram yes
@andrescalderon4454
@andrescalderon4454 8 месяцев назад
how can you acces an specific color value from the primary color scale example 400?
@hamedbahram
@hamedbahram 8 месяцев назад
Similar to tailwind. For example for text colour you can use `text-primary-400`.
@user-bk6xu3ue3q
@user-bk6xu3ue3q 3 месяца назад
HELP! in browser I see app-index.tsx:26 Warning: Extra attributes from the server: class,style when I hide NextThemeProvider. warnings is gone. I think problem is NextThemeProvider how to fix it?
@hamedbahram
@hamedbahram 3 месяца назад
You can use the `suppressHydrationWarning` prop like this ↓ ``` {children} ```
@KNJM18
@KNJM18 9 месяцев назад
Thanks you for this video, it's perfect👌 but can you say to me how have a font-family for vscode like you ?
@hamedbahram
@hamedbahram 9 месяцев назад
Thanks. I'm using Operator mono.
@anversadutt
@anversadutt 9 месяцев назад
Awesome bro
@hamedbahram
@hamedbahram 9 месяцев назад
Thanks 🤙
@hafeezullah9706
@hafeezullah9706 9 месяцев назад
Hi Hamed, Hope you are doing well. I want to make multiple API calls one after the other in a Next.js on home page, for 5 different sections, I want to call them one after other, so that page does not take time, please tell me, What will be the most efficient way. if you have any video related, please share
@hamedbahram
@hamedbahram 9 месяцев назад
If you have nested components, and each component fetches its own data, Then, data fetching will happen sequentially (one after another). You can then wrap the components with suspense to avoid blocking rendering. Another patterns is parallel data fetching to avoid waterfalls, whereby all requests trigger at the same time. You can read more about these patterns here => nextjs.org/docs/app/building-your-application/data-fetching/patterns
@rean8899
@rean8899 6 месяцев назад
I think the default theme not working properly? when I try to set light theme as default theme
@hamedbahram
@hamedbahram 6 месяцев назад
Hmm 🤔 how do you mean its not working?
@user-pt5rr5ul7z
@user-pt5rr5ul7z 6 месяцев назад
which font extension you use for the code, it looks cool thooo......
@hamedbahram
@hamedbahram 6 месяцев назад
My font is Operator mono.
@user-pt5rr5ul7z
@user-pt5rr5ul7z 4 месяца назад
the font that i have to install is paid @@hamedbahram
@user-iy8ot8km8x
@user-iy8ot8km8x 3 месяца назад
درود خیلی خوشحال شدم وقتی اسمتو خوندم و متوجه شدم ایرانی هستی .بعد از معرفی ها یه آموزش پروژه محور از NextUI میتونه ایده خوبی باشه!
@hamedbahram
@hamedbahram 3 месяца назад
Eraadat 🫡 Thanks for the suggestion.
@user-cc9pr6fm1p
@user-cc9pr6fm1p 9 месяцев назад
Solved my problem. Thank you
@hamedbahram
@hamedbahram 9 месяцев назад
Glad to hear that!
@MuamerO90
@MuamerO90 8 месяцев назад
How about using NextUI and ShadcnUI together at the same project? Some components look better in one than in another how would that work?
@hamedbahram
@hamedbahram 8 месяцев назад
While it'll generally be better to stick to one design system, you can use them both together as well.
@MuamerO90
@MuamerO90 8 месяцев назад
@@hamedbahram Do you think you could make a video about it? Might be interesting to see how and what ui libraries you could combine and get something unique.
@Beast80K
@Beast80K 8 месяцев назад
Respected Sir, Can you make a video on NextUi table component, if possible? How to sort, search etc. I was thinking if its possible to use React Table + Next Ui Table components together, react table does aorting, pagination, searching etc. takes care of it. While Next Ui will provide Table components.
@hamedbahram
@hamedbahram 8 месяцев назад
For sure! That'll be a good topic to cover.
@igmtink
@igmtink 9 месяцев назад
there's a problem when using the "next-themes" on "next.js 13 app router" if you see the console on chrome dev tools "Warning: Extra attributes from the server: class,style"
@hamedbahram
@hamedbahram 9 месяцев назад
That's right unfortunately that's inevitable! you can pass the `suppressHydrationWarning` prop on your html tag to ignore the mismatch on the first render.
@igmtink
@igmtink 9 месяцев назад
@@hamedbahram thank you it work 😊
@hamedbahram
@hamedbahram 9 месяцев назад
@@igmtink Awesome!
@LeonGaban
@LeonGaban 2 месяца назад
Hi! I'm totally loving your tutorial series! :D quick question, have you ran into this error before? app-index.js:35 Warning: Extra attributes from the server: class,style at html
@hamedbahram
@hamedbahram 2 месяца назад
That typically happens when using a theme provider that sets classes or styles on the html, you can use the `suppressHydrationWarning` prop on your html element.
@LeonGaban
@LeonGaban 2 месяца назад
@@hamedbahram figured it out, answer posted on my stackoverflow question.
@LeonGaban
@LeonGaban 2 месяца назад
Another question, when I change themes, my classes stack, ie: dark & modern both exist in the same class??
@user-lc9sr8lt7x
@user-lc9sr8lt7x 5 месяцев назад
Thank you for this good video - I liked and subscribed at once. NextUI is a Component Library. Could you explain how to make a Design System, using Storybook, based on NextUI, then deploy this to npmjs? It feels like a component library is needed in defining a Design System, but how should it all play together? If I have a DS, can I also use the Component System or should the DS define all use? Soo many questions...
@hamedbahram
@hamedbahram 5 месяцев назад
Good question! different ways to go about it, you can use the UI library as your DS in the case of NextUI if it was a lower level primitive component library like radixUI you could create your own DS abstraction on top of it like what shadcn/ui has done.
@prashlovessamosa
@prashlovessamosa 9 месяцев назад
Happy Teachers day sir thanks for the service.
@hamedbahram
@hamedbahram 9 месяцев назад
Thank you!
@Beast80K
@Beast80K 9 месяцев назад
Sir, 1st of all *Thank you* providing knowledge & very good explanation ! After watching your tutorials, I tried my code & it was working then suddenly it started showing this error. Next.js (13.4.19) Also tried with various Next.js versions 13.5.3, 13.4 Unhandled Runtime Error InvalidCharacterError: Failed to execute 'add' on 'DOMTokenList': The token provided ('[object Set]') contains HTML space characters, which are not valid in tokens. I thought it might be my mistake somewhere, hence I tried using your code from two different NextJS theme related tutorials same error. *Any solution ?*
@hamedbahram
@hamedbahram 9 месяцев назад
I'm not sure what exactly is causing the error. Try cloning my repo and see if you have the same problem. I just tested it out on my end and I don't see any errors.
@Beast80K
@Beast80K 9 месяцев назад
@@hamedbahram *Clearing browser history including everything cookies, caches, etc. it resolved the issue.* I have now also disabled auto save after delay in code editor, to prevent constant refreshing & compiling of page. Now both your repo code & my written code works as expected. *Thank you,* once again.
@hamedbahram
@hamedbahram 9 месяцев назад
@@Beast80K Sweet! Glad to hear that.
@samanhoseinpour1
@samanhoseinpour1 9 месяцев назад
Thanks man. 🙏🏼
@hamedbahram
@hamedbahram 9 месяцев назад
Any time!
@MuhamadAzizPrasetyo
@MuhamadAzizPrasetyo 7 месяцев назад
Currently, I don't think NextUI fully includes the "use client" directive. For example, when I want to use the "Dropdown" component, I have to write "use client" manually. However, I still thank you for making a good video.
@hamedbahram
@hamedbahram 7 месяцев назад
That's right! I had a similar experience with some of the components.
@ahmedsamy9999
@ahmedsamy9999 9 месяцев назад
This ui components library in my heart❤❤😂
@hamedbahram
@hamedbahram 9 месяцев назад
Awesome!
@srirams60
@srirams60 8 месяцев назад
Can put a video for Setting up everything in nextjs 13, for example Themes, Components ,State Management !!
@hamedbahram
@hamedbahram 8 месяцев назад
For sure! I'll have a video coming up for state management soon.
@antonycarlos4703
@antonycarlos4703 9 месяцев назад
can you do it with jsx
@hamedbahram
@hamedbahram 9 месяцев назад
In most cases they'd be very similar. Some of my videos are JS some are TS.
@persianwolf7609
@persianwolf7609 8 месяцев назад
damet garm kheyli karet doroste
@hamedbahram
@hamedbahram 8 месяцев назад
Eraadat 🫡
@ronaldpaek
@ronaldpaek Месяц назад
Can you use next-themes with a react-vite project or only works with next js apps?
@hamedbahram
@hamedbahram Месяц назад
To be honest, I'm not sure! Test it out :)
@srirams60
@srirams60 8 месяцев назад
And also Generate our Custom Components!!
@hamedbahram
@hamedbahram 8 месяцев назад
For sure!
@0xtz_
@0xtz_ 9 месяцев назад
Customize shadcn ? Video please 🙏, be the first hhh
@hamedbahram
@hamedbahram 9 месяцев назад
Absolutely!
@PeterWraaeMarino
@PeterWraaeMarino 7 месяцев назад
I am new to react and nextui. your video is too confusing. for example provider.tsx where did that come from?!?! it is like you are skipping a lot of basic steps that newbies like me do not know .
@hamedbahram
@hamedbahram 7 месяцев назад
Sorry if this is confusing for you! This is for folks who are comfortable with React and NextJs and want to add NextUI to their project. You can watch other videos here on the channel where I explain fundamental concepts in NextJs to understand what different files and folder structures are.
@PeterWraaeMarino
@PeterWraaeMarino 7 месяцев назад
@@hamedbahram I am sorry but this tutorial is really poorly made. You are skipping a lot of stuff related to the subject at hand. you do not mention that you need to install next-themes, you jump from NextUI and Next project with different setups. Your tutorial is not a place to learn anything.
@aminchiha2674
@aminchiha2674 9 месяцев назад
keep up the good work
@hamedbahram
@hamedbahram 9 месяцев назад
Absolutely 💯
Далее
This UI component library is mind-blowing
8:23
Просмотров 596 тыс.
The Story of Next.js
12:13
Просмотров 549 тыс.
Редакция. News: 122-я неделя
44:21
Просмотров 1,4 млн
10 common mistakes with the Next.js App Router
20:37
Просмотров 185 тыс.
NextJS 13. Быстрый старт
40:12
Просмотров 105 тыс.
Every React Concept Explained in 12 Minutes
11:53
Просмотров 412 тыс.
Ryan Dahl introduces JSR at DevWorld 2024
29:13
Просмотров 99 тыс.
Shadcn + Next.js 13 is HEAVEN | A QUICK GUIDE
13:30
Просмотров 124 тыс.
The BEST way to host Next.js websites
17:37
Просмотров 23 тыс.
Why I Pick ShadCN and Tailwind for all my projects
18:53
С iPhone точно не укачает!
0:41
Просмотров 362 тыс.
How To Unlock Your iphone With Your Voice
0:34
Просмотров 26 млн
Спидран по ПК
0:57
Просмотров 27 тыс.