How to Create a Sidebar in Next.js & Tailwind CSS

preview_player
Показать описание


Benefits of using Tailwind CSS
1. It is Highly Customizable: Tailwind CSS is a highly customizable framework. The configuration file enables easy customization of color palettes, styling, spacing, themes, etc.

2. It Has Common Utility Patterns: Eliminate the hassle of naming classes with Tailwind CSS. The availability of common utility patterns solves numerous problems like specifying classes, organizing them, cascading them, and much more. Utility classes simplify the process of creating custom components. You do not need to hard-code with Tailwind CSS. You can apply the theme() function to extract values from the configuration files.

3. It Can Be Optimized Using PurgeCSS: A major advantage of Tailwind CSS is that optimization can be performed using PurgeCSS. PurgeCSS can reduce the file size considerably by scanning the HTML and removing unused classes. It is easy to set up PurgeCSS in combination with Tailwind CSS and is highly recommended to do so before deploying the site. As the size of the project grows, the size of the CSS file also increases. However, this does not happen when using Tailwind. The use of a standardized set of classes keeps the file size small as long as the project remains active.

4. It Enables Building Complex Responsive Layouts Freely: The Tailwind CSS framework uses a default mobile-first approach.

5. It Facilitates Fluid Community Interaction

Check OUT other React tutorials:

_______________________________________
SOURCE CODE:

___________________________________________
🙏 PLEASE SUBSCRIBE FOR MORE VIDEOS 👇

____________________________________________
🔮OTHER VIDEOS YOU MIGHT LIKE👇👇
____________________________________________

HELPFUL RESOURCES
Certified ScrumMaster Training: Get $200 off Today! Use this code SCRUM200

$2,760 in Savings: Premium PMP Exam Prep Boot Camp! Get everything you need to pass & enhance your skills

Follow me on Social Media:

KEYWORDS
Рекомендации по теме
Комментарии
Автор

This is really good dude; one question, if the content section have long which needs vertical scrolling will the sidebar stay fixed?

raymondmichael
Автор

When im console.log(activeMenu) i got notice like this undefined, how to fix this?

gantengerscrews
Автор

Hi, thank you, this has clarified a few things for me. My only concern with your navbar is that you are duplicating it. With a simple trick, I was able to toggle the nav function to modify CSS using just one menu - this is much easier to maintain (unless one would want different items displayed in each).

janbakalar
Автор

Very nice design, on thing i doubt that when i change the route manually will the active tab change, if not how can I do so

ShrivastavAditya
Автор

How do you add a dropdown to the side bar?

CribInn
Автор

["bg-light-lighter"]: activeMenu.id === menu.id, , how to fix this?

carlosantunes
Автор

Hi, kindly help me on adding submenu on your code, thanks

luqmanusman
Автор

This is helpful, how about a full layout, responsive like this but with a header and a footer.

julietkelechi
Автор

Does this page work on server side rendering

swathis
Автор

Great video. Constructive criticism: the audio quality is so poor it makes watching the video unpleasant.

mIkeyGermita
Автор

TypeError: Cannot read properties of undefined (reading 'id') how to fix this?

carlosantunes
Автор

Error: Failed prop type: The prop `href` expects a `string` or `object` in `<Link>`, but got `undefined` instead.
Open your browser's console to view the Component stack trace.

Can i get some help please?

the_hostelguy_room_plug
Автор

Server Error
TypeError: Cannot read properties of undefined (reading 'id') - ["bg-light-lighter"]: activeMenu.id === menu.id, help

carlosantunes
Автор

How do I make the sidebar static and not affect the content, thanks for the video, I hope a prompt response

christianenriquevillamoral
Автор

Nice tutorial, thank you. I wanted to point out a problem: the logout menu item is not part of activeMenu. If you add a Link to the logout menu item, it will trigger the useMenu, which will fail because the logout router path is not in activeMenu. You cannot add logout to activeMenu unless you add special treatment for the positioning at the bottom of the page. A hack to work around this is to create a memoItems list which includes logout in the array and pass that to useMemo. What is a better way to deal with this?

siddharthram
Автор

I just can't get that shit to not cover content. CSS sucks so bad I just can't

grigorecosmin
visit shbcf.ru