Creating a Navigation Bar with Next.js & Tailwind CSS: A Step-by-Step Guide

Поделиться
HTML-код
  • Опубликовано: 7 июн 2024
  • Private 1 on 1 Help 👇
    calendly.com/dabrettwestwood/...
    Join my FREE Discord to talk and network about web development! 👇
    / discord
    In this tutorial, we'll be showing you how to create a sleek and functional navigation bar using the popular JavaScript framework Next.js and the utility-first CSS library Tailwind CSS. Whether you're a beginner or an experienced web developer, this guide will provide you with all the information you need to get started with building a navigation bar for your next project.
    We'll be covering everything from setting up your Next.js environment to integrating Tailwind CSS and styling your navigation bar. You'll also learn how to add links, active states, and dropdown menus to your navigation bar. By the end of this tutorial, you'll have a solid understanding of how to create a navigation bar with Next.js and Tailwind CSS.
    Some key topics that will be covered include:
    Setting up a Next.js project
    Installing Tailwind CSS
    Integrating Tailwind CSS with Next.js
    Creating a navigation bar using HTML and Tailwind CSS classes
    Adding links to the navigation bar
    Adding active states to navigation links
    Customizing the navigation bar with Tailwind CSS utilities
    Don't miss out on this comprehensive guide to creating a navigation bar with Next.js and Tailwind CSS. Make sure to like, comment, and subscribe for more tutorials like this!
    TimeStamps
    0:00 Intro
    0:05 Create NextJS Project
    1:52 Install TailwindCSS in project
    5:05 Create Navbar Component
    6:30 Create & Customize Navbar
    30:00 Outro
  • РазвлеченияРазвлечения

Комментарии • 65

  • @Cameron-Porter
    @Cameron-Porter Год назад +2

    Great video and solid tutorial. Keep the content coming! Always hard putting yourself out there.

  • @vitorac412
    @vitorac412 11 месяцев назад +1

    Man, you are so chill. Thats great, I mean, its not rocket science, no need verbosity. Thanks for the video, for sure Im going to keep up following your content. Would love to watch you teaching some supabase and prisma stuff!

  • @anthonywells1421
    @anthonywells1421 Год назад +1

    I really enjoyed this! good work- keep them coming

  • @experienced-dev
    @experienced-dev Год назад +1

    Thank you for the great tutorial, Brett!
    One refactoring suggestion on 22:28
    ```
    ```

  • @datenschutzification
    @datenschutzification Год назад +2

    great tutorial. tailwind is pretty new to me. thx a lot.

  • @-Abdullah1
    @-Abdullah1 7 месяцев назад +1

    Thank you for explaining every part

  • @guidollaurado2319
    @guidollaurado2319 7 месяцев назад +1

    Great video! Pro + simple = really pro!

  • @rudrapednekar1644
    @rudrapednekar1644 Год назад +1

    This has helped me a lot. Thankyou!! 👍

  • @eduardomanusse2904
    @eduardomanusse2904 10 месяцев назад +1

    Done and done, thanks for the video.

  • @user-zm1sr5qp5f
    @user-zm1sr5qp5f Месяц назад +1

    thank you for this tutorial bro, you helped me understand many things i could not get before even though my first language is not even English, you explain really good!!!

  • @xenyens
    @xenyens Год назад +1

    Great video, excelent explication.

  • @Henrique96Alves
    @Henrique96Alves 4 месяца назад +1

    Thank you so much.

  • @christianstense999
    @christianstense999 10 месяцев назад +1

    I like this!

  • @dev.dimensions
    @dev.dimensions Год назад +1

    As I've picked up in another tutorial when updating state it is best practice to use the prevState argument when updating the state, e.g. setMenuOpen((prevState) => !prevState)
    Solid tut && subbed for more content. Watching you grow your channel.

  • @faarees3527
    @faarees3527 Год назад +2

    great tutorial keep up

  • @GeorgeFelixBarbosa
    @GeorgeFelixBarbosa Год назад +2

    Great tutorial, thanks man. Would be perfect if it'd have a submenu example.

  • @paulinegitonga6808
    @paulinegitonga6808 Год назад +9

    hey this was fun to do just kindly increase the font size in vs code and maybe provide the source code to avoid constant pausing/fowarding/rewinding on the video

  • @ortoys6121
    @ortoys6121 Год назад +1

    good work bro!

  • @1berkproduction
    @1berkproduction Год назад +1

    Nice Explanation

  • @shaikhsanuar5339
    @shaikhsanuar5339 Год назад +1

    Great ❣️

  • @sanjay2102
    @sanjay2102 Год назад +1

    Good tutorial ser

  • @D369_
    @D369_ 10 месяцев назад +1

    thank goodness I found this video. 😅

  • @davique0
    @davique0 Год назад +1

    I really hope you are getting good retribution for this amazing job. Thanks a lot. Just have a really quick question. Did you use the next/font? I see that you imported it but I don't get where it is used or how.

    • @brettwestwooddeveloper
      @brettwestwooddeveloper  Год назад

      Thank you!

    • @brettwestwooddeveloper
      @brettwestwooddeveloper  Год назад

      next/font is auto imported and it's used in the layout.js file. you will import the font style from next/font/google. Then you will use it in your body

  • @JADHAVKUNAL-md7tp
    @JADHAVKUNAL-md7tp 4 месяца назад

    this same will work when i do with typescript as set to be yes know??

  • @sandeepreddypalannagari8489
    @sandeepreddypalannagari8489 5 месяцев назад

    sir how to add multiple level dropdown in the nav bar

  • @JochenPrinsen
    @JochenPrinsen Год назад +1

    Great tutorial; would there be any alternative possible for useState-array (avoiding 'use client' statements in front of import)? Apparently any component is considered to be [solely] a server-side component when residing in the /app directory (as of Next.js 13)? Thanks in anticipation

    • @brettwestwooddeveloper
      @brettwestwooddeveloper  Год назад +1

      I don't think there is an alternative at the moment. It must be set as a client side rendered page since it has interactivity. You might be able to separate components and try that way

    • @JochenPrinsen
      @JochenPrinsen Год назад +1

      @@brettwestwooddeveloper thanks Brett! Keep up the good work!

    • @Bleufox99
      @Bleufox99 16 дней назад

      @@brettwestwooddeveloper you can split all the individual components into separate jsx files only adding 'use client' in the file that imports useState and then assemble it all into the navbar file, the same way components are assembled the layout file.

  • @indimerz
    @indimerz 3 месяца назад

    i didnt understood how your mobile nav menu animates from left to right when you click on hamburger (menu icon)

  • @antrahagure5372
    @antrahagure5372 Год назад +1

    How did you align logo with links in horizontal lane?

    • @brettwestwooddeveloper
      @brettwestwooddeveloper  Год назад +1

      I had a div inside the main div that had the properties. h-full and item-scenter. That would align it horizontal. Let me know if that makes sense. I did it at the 9:25 mark

  • @Sandeep.singh01
    @Sandeep.singh01 11 месяцев назад +1

    Hello Brett
    maybe one of these should be marked as a client entry with "use client"
    I am getting this error when i an running my code….!!!
    Would you help me out with this one
    I will really appreciate it….!!!

    • @brettwestwooddeveloper
      @brettwestwooddeveloper  11 месяцев назад

      any pages using interactivity such as useState should have the use client directive

  • @falcon94q
    @falcon94q Год назад +4

    Well done! But there is a request. Increase the font of your code!!! Because you can't see anything! And make the video itself a little lighter, otherwise it's dark.
    Thank you! Good luck!
    ps - Don't drop your channel.

    • @brettwestwooddeveloper
      @brettwestwooddeveloper  Год назад

      Thanks for the feedback, I was wondering about that! Will do next time

    • @falcon94q
      @falcon94q Год назад +1

      @@brettwestwooddeveloper You are doing the right thing that you are talking about ready-made code, and not writing it online. Your story does not tire, but rather gives energy for independent work on the project.
      Wish you have a million subscribers! - and even more!

  • @MateusPikao
    @MateusPikao 6 месяцев назад +1

    Can you please provide the code?

  • @reactwithmohsen7249
    @reactwithmohsen7249 11 месяцев назад

    github Repo bro ?

  • @hamzabadii3575
    @hamzabadii3575 Год назад

    My friend i can't see the code 😤

  • @IronMan-qf6il
    @IronMan-qf6il Год назад +1

    Can I get the source code please

    • @IronMan-qf6il
      @IronMan-qf6il Год назад

      I really need it please help your subscriber 😅