🌐
PrimeReact
primereact.org › menubar
Menubar - React Navbar Component
Menubar also known as Navbar, is a horizontal menu component · import { Menubar } from 'primereact/menubar'; Menubar requires a collection of menuitems as its model. <Menubar model={items} /> Custom content can be placed inside the menubar ...
🌐
PrimeFaces
primefaces.org › primereact-v8 › menubar
PrimeReact | React UI Component Library
Menubar also known as Navbar, is a horizontal menu component. ... <script src="https://unpkg.com/primereact/core/core.min.js"></script> <script src="https://unpkg.com/primereact/menubar/menubar.min.js"></script>
Discussions

reactjs - How to remove menubar-button in PrimeReact's MenuBar? - Stack Overflow
I want a MenuBar with no hamburger button appearing while in responsive mode. I'm using CSS module to style my components. How can I completely remove hamburger menu button using CSS module? I can'... More on stackoverflow.com
🌐 stackoverflow.com
reactjs - I can't change route from Primereact menu - Stack Overflow
I am using PrimeReact menu to changue routes, the problem that I have is when I run the application, the line "command: this.props.ruta ('Detalle')" run automatically and I can't changue to More on stackoverflow.com
🌐 stackoverflow.com
useContext without rerender whole application
As an alternative, you could also create a small external state by your own, for example like this: https://bennett.dev/recoil-from-scratch/ No need to install a full library if your usecase is this simple. To connect it with react, see reacts useSyncExternalStore hook: https://react.dev/reference/react/useSyncExternalStore More on reddit.com
🌐 r/reactjs
17
11
April 23, 2024
Checked 21 React UI kits briefly, I'm done

Just make your own UI with SCSS or styled-components, with react-icons

More on reddit.com
🌐 r/reactjs
151
278
December 19, 2018
🌐
Scaler
scaler.com › home › topics › react › how to use primereact in react applications?
How to Use PrimeReact in React Applications? - Scaler Topics
May 4, 2023 - Inside this folder, create a file with the name NavBar.jsx. We will write our NavBar code inside this file only. This is what our file system will look like. 2. Creating CSS file Create another file with the name 'NavBar.module.css' which will be used to write CSS properties of the NavBar component. Also, import styles (CSS) from this file in our NavBar component. ... 3. Creating NavBar, NavBar right, and NavBar left Given below is the code which creates the NavBar of our React Application.
🌐
LogRocket
blog.logrocket.com › home › create a responsive navbar with react and css
Create a responsive navbar with React and CSS - LogRocket Blog
January 17, 2025 - In this tutorial, we will learn how to create a responsive navigation bar using React.js and CSS. Also, we will look at how we can apply media queries to make our navbar responsive to different screen sizes.
🌐
PrimeReact
primereact.org › menu
PrimeReact | React UI Component Library
Menu is a navigation/command component that supports dynamic and static positioning.
🌐
Primereact
v9.primereact.org › menubar
React Navbar Component
Menubar also known as Navbar, is a horizontal menu component · import { Menubar } from 'primereact/menubar'; Menubar requires a collection of menuitems as its model. File · New · Bookmark · Video · Delete · Export · Edit · Left · Right ...
🌐
Medium
medium.com › @shiderdev › why-do-you-need-react-sidenav-library-when-you-can-use-primereact-and-css-75d8946af142
Why do you need react-sidenav library when you can use Primereact and CSS | by Shider | Medium
December 22, 2023 - We change the data model, and React renders the changes in the UI. The react-sidenav doesn’t offer a model, but Primereact does, and it’s called MenuModel API. The react-sidenav and the Primereact side navigation use the same menu model object for easier comparison.
Find elsewhere
🌐
CodePen
codepen.io › danbuda › post › a-react-navbar-component
A React Navbar Component by Dan on CodePen
October 13, 2016 - First things first, I need to set my entry point for my navbar in my index.html file. I'll just insert a <navbar> tag inside the body: ... Now I need to create my basic React component.
🌐
YouTube
m.youtube.com › watch
React Sidebar Navigation Menu Tutorial - Beginner React JS ...
Share your videos with friends, family, and the world
Published   August 18, 2020
🌐
npm
npmjs.com › package › @tchvan › primereact-navbar
@tchvan/primereact-navbar - npm
Prime react theme selection sidebar. Latest version: 1.0.5, last published: 10 months ago. Start using @tchvan/primereact-navbar in your project by running `npm i @tchvan/primereact-navbar`. There are no other projects in the npm registry using @tchvan/primereact-navbar.
      » npm install @tchvan/primereact-navbar
    
Published   Feb 19, 2025
Version   1.0.5
Author   Fortune Truong
🌐
DEV Community
dev.to › stephanieopala › simple-navigation-bar-in-react-js-4d5m
Simple responsive navigation bar | React.js - DEV Community
July 19, 2022 - This article is a step-by-step guide on how to create a simple navigation bar using React.js, styled...
🌐
Medium
buckhouse.medium.com › beginner-react-nav-bar-tutorial-e30035e6c89e
Beginner React Nav Bar Tutorial. Step-by-step | by James Buckhouse | Medium
April 1, 2025 - Beginner React Nav Bar Tutorial Step-by-step Recently I learned React and used it to completely rebuild my personal site. You can see the results here, if you’re curious about what a …
🌐
YouTube
youtube.com › watch
How To Create A Navbar In React With Routing - YouTube
FREE React Hooks Course: https://courses.webdevsimplified.com/react-hooks-simplifiedNavbars are one of the most common components you will create in React. C...
Published   May 24, 2022
🌐
GitHub
github.com › primefaces › primereact
GitHub - primefaces/primereact: The Most Complete React UI Component Library · GitHub
PrimeReact is a rich set of open source UI Components for React.
Starred by 8.3K users
Forked by 1.2K users
Languages   CSS 59.8% | JavaScript 39.7% | SCSS 0.5%
🌐
npm
npmjs.com › package › primereact
primereact - npm
August 15, 2025 - PrimeReact is an open source UI library for React featuring a rich set of 90+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support.
      » npm install primereact
    
Published   Aug 15, 2025
Version   10.9.7
Author   PrimeTek Informatics
🌐
React.js Examples
reactjsexample.com › tag › sidebar
Sidebar - React.js Examples
May 20, 2018 - Customizable and responsive react sidebar library with dropdown menus and unlimited number of nested submenus · This project is somewhat of a research experiment into the most convenient way of implementing responsive sidebars · Based on johanneslumpe's react-native-selectablesectionlistview, ...
Top answer
1 of 3
2

Regarding the new version of React-Router and PrimeReact. You can rock it with the useNavigate directly.

import "./MyMenu.scss"
import React from "react";
import { Menubar } from 'primereact/menubar';
import {InputText} from "primereact/inputtext";
import {Button} from "primereact/button";
import {PrimeIcons} from "primereact/api";
import {useNavigate} from "react-router-dom";


const MyMenu = (props) => {
        const navigate = useNavigate();
        const items =  [
            {
                label: 'Home',
                icon: PrimeIcons.HOME,
                command: () => {navigate('/') }
            }
        ];

        let searchAndLogout = <div>
            <InputText placeholder="Search" type="text"/>
            <Button label="Exit" icon="pi pi-power-off"/>
        </div>

        return (
            <div className="my-menu">
                <Menubar model={items} end={searchAndLogout}/>
            </div>
        );
}


export default MyMenu;

2 of 3
1

I have implemented primefaces menubar with react router.

First I have created a navigation items object as described in primefaces documentation.

navigationConfig.js looks like this:

 export const navitems = [
    {
        label: 'Africa',
        icon: 'pi pi-fw pi-user',
        url: '/africa'
    },
    {
        label: 'Europe',
        icon: 'pi pi-fw pi-pencil',
        url: '/europe'
    },
    {
        label: 'Asia',
        icon: 'pi pi-fw pi-th-large',
        items: [
            {
                label: 'Japan',
                url: '/japan'
            },
            {
                label: 'Mongolia',
                url: '/mongolia'
            },
            {
                label: 'Nepal',
                items: [
                    {
                        label: 'Kathmandu',
                        url: '/kathmandu'
                    },
                    {
                        label: 'Pokhara',
                        url: '/pokhara'
                    }
                ]
            }
        ]
    }
]

Then in my navigation component I have created a recursive method that maps each url of menu item into a command method which then calls a history.push() method of useHistory() hook from react-router-dom

Full navigation component looks like this:

import React from 'react';
import * as nav from '../config/navigation';
import { Menubar } from 'primereact/menubar';
import {Button} from 'primereact/button';
import { useHistory } from "react-router-dom";


const Navigation = (props) => {

    const history=useHistory();

    const getMenuObject=(menu)=>{
       
        let menuObj={};

        menuObj.label=menu.label;

        if(menu.items){
           //if the navigation has items property then map each item and call itself again
            menuObj.items=menu.items.map(nestedItem=>{
                return getMenuObject(nestedItem);
            });  
        }

        if(menu.icon){
            menuObj.icon=menu.icon;
        }
        if(menu.url){
            menuObj.command=()=>{
               navigatePage(menu.url);
            }
        }
       
        return menuObj;
    }

    const navigationMenu=nav.navitems.map(menuItem=>{
        return getMenuObject(menuItem);
    })
    
    const navigatePage=(url)=>{
        history.push(url);
    }


    return (
        <Menubar 
        model={navigationMenu}
        end={<Button label="Logout"  onClick={(e)=>props.onLogout(e)} icon="pi pi-power-off"/>}
        />
    );
}

export default Navigation;

Hope it will help whoever is looking for a solution.

🌐
Webscale
section.io › home › blog
How to use PrimeReact in React Applications
June 24, 2025 - Get the latest insights on AI, personalization, infrastructure, and digital commerce from the Webscale team and partners.