react-responsive-navbar asks for four props and renders whatever you pass
Nothing crazy, nothing flashy, just a simple, flexible & completely customisable responsive navigation bar component.
At a glance
- What is it?
- react-responsive-navbar is a small React component that swaps a small-screen menu for a large one at a pixel width you choose. It carries one runtime dependency, ships no tests, and its peer range stops at React 16. The last commit is dated 1 March 2023.
- Who is it for?
- This component suits a project that wants a responsive menu switch without a CSS framework and is content to supply its own markup and icons. It does not suit a team that wants styling, animation, dropdown behaviour or accessibility handling beyond what the underlying elements provide.
- Can I use it commercially?
- Not without permission. GitHub finds no licence file in the repository, and without a licence all rights are reserved by default: you may read the code but not reuse it. Check the README, or ask the authors, before using it.
- Is it still maintained?
- Probably not. The repository last received commits 44 months ago, on March 1, 2023.
- What is it written in?
- Mainly JavaScript, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 22, 2026, and from our analysis. They are not legal advice.
Star history
- stephanieinez/react-responsive-navbar50 ★ · +0
| Repository | 2026-08-18 | 2026-10-22 |
|---|---|---|
| stephanieinez/react-responsive-navbar | 50 | 50 |
0 Stars in the last 65 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
Four required props, and the component supplies nothing else
The whole API is one component and six props, four of which you must supply. The README's own framing is that this is nothing crazy and nothing flashy, just a simple, flexible and completely customisable navigation bar, and the prop table matches that claim closely. Required are menuOpenButton and menuCloseButton, both typed as react components, changeMenuOn, a string, and menu, another react component. Optional are largeMenuClassName and smallMenuClassName, both strings. There are no props for colours, transitions, animation, open state, onToggle callbacks or accessibility attributes, which is the clearest signal of the design: the component decides when to switch between two modes and nothing else. Installation is a single command:
npm install --save react-responsive-navbarThe breakpoint is a pixel string, not a media query
changeMenuOn is the prop that decides everything, and its type is narrower than it first appears. It takes the page width as a string in pixels at which the component switches between the small and large menu, and the usage example passes 500px. Because it is a string rather than a number, the component is doing string comparison rather than reading a media query, which means it responds to one measured width and nothing else: no orientation handling, no prefers-reduced-motion branch, no separate tablet step. That is a deliberate simplification for a component with six props, but it is the kind of thing that surfaces later, when someone asks why the menu collapses at a width their design system never intended. Two class name props then let each mode be styled separately, so the two layouts can diverge visually without the component knowing anything about your styles.
The icons are yours, and the demo uses react-icons
The open and close buttons are passed in as components, and the README is unusually direct about the implication: the author uses react-icons in the example, and you are free to use any div that you please. That means the package has no opinion about iconography, no built-in hamburger, and no bundled asset. It also means the accessibility burden is on whatever you pass. A div used as a button is not focusable, has no role and no accessible name unless you add them, and nothing in this component adds them for you. Since the whole point of the small mode is a toggle, that is the one place where the component's minimalism has a real cost, and it is worth noticing that the example the README points at does not address it either.
One runtime dependency the component does not style with
The dependency list has exactly one entry, styled-components at 2.2.4, and it is worth asking what it is doing there. The component exposes no style props of any kind: the only styling hooks are two class name strings. Nothing in the README describes a styled component being passed in, and the rendered output is whatever you hand it through menu. So the single runtime dependency is not something the component needs in order to position or colour the menu; it is either a leftover from an earlier design, or a requirement imposed on consumers rather than used by the library. Either way, installing this package also installs styled-components 2.x into your dependency tree, which is a heavy runtime dependency to acquire alongside a component that renders your own markup. The peer dependency list separately declares prop-types, which is the component actually using.
The peer range stops at React 16
This is the single most important line in the package manifest for anyone installing today. The peer dependencies accept react and react-dom at 0.14.9, 15.0.0 or 16.0.0, and prop-types at 15.5.4. Nothing later is declared. A project on React 17 or newer therefore installs a package whose declared peer range does not include its React, which produces an unmet peer dependency warning and, depending on the resolver, a hard failure. The devDependencies reinforce how old the toolchain is: Babel 6 with the stage-0 preset, rollup at 0.50, and the first generation rollup plugins. The last commit is dated 1 March 2023, and the version is 1.0.11 with no tagged releases, so npm is the distribution channel and the manifest is the only version information available.
The test script fails on purpose and there is no suite
Look at the scripts block before assuming there is verification. The test script is the placeholder npm generates for a project with no tests: it echoes an error message saying no test is specified and exits with status 1. So running the tests always fails, by design, and there is no test directory in the tree. What exists instead is an example application under example/, with its own package.json, its own lockfiles, its own public and source directories and its own README. That example is also the live demo, deployed with gh-pages from the example build directory, and it is the same project the README links to as this demo. In other words, the project's assurance is a working example, not assertions, which is a reasonable trade for a six-prop component and an unreasonable one for anything load-bearing.
Two lockfiles at the root, two more in the example
The build is rollup, and the published surface is narrow by design. The package publishes only dist, named in the files array, and that directory contains two entry points: main pointing at a CommonJS build and module plus jsnext:main pointing at an ES module build. The scripts around it are the conventional ones for this layout: build runs rollup against the config, start runs the same config in watch mode, prepublish runs the build first, and a predeploy step installs and builds the example before gh-pages publishes it. What is unconventional is the lockfile situation. The root contains both package-lock.json and yarn.lock, and the example directory contains its own package-lock.json and its own yarn.lock as well. Two package managers tracked in two places at once means a clean install is only reproducible if you pick one and stay with it.
Editorial conclusion
This component suits a project that wants a responsive menu switch without a CSS framework and is content to supply its own markup and icons. It does not suit a team that wants styling, animation, dropdown behaviour or accessibility handling beyond what the underlying elements provide. Before installing it, check three things: whether your React version falls inside the declared peer range, which stops at React 16, whether you are willing to own the styling since the package exposes class names rather than style props, and whether the absence of any test suite matters for the project you are putting it in, since the test script is a placeholder that fails on purpose.
Frequently asked questions
How do I create a responsive navbar with react-responsive-navbar?
Install it, then render one component with four required props: menuOpenButton and menuCloseButton for the small-screen icons, changeMenuOn with the pixel width at which the menu should switch, and menu holding your own content. Two optional class name strings let you style the large and small layouts separately.
What are the different types of navbars in react-responsive-navbar?
Two, and only two: a small menu driven by the open and close buttons you pass in, and a large menu rendered at or above the pixel width given to changeMenuOn. The component offers no third breakpoint, no orientation variant and no separate tablet mode.
Which props does react-responsive-navbar require?
Four are required: menuOpenButton and menuCloseButton as react components for the small-screen icons, changeMenuOn as a string giving the width in pixels, and menu as a react component for the content. Two are optional: largeMenuClassName and smallMenuClassName as strings for styling each mode separately.
Does react-responsive-navbar ship any tests?
No. The test script in package.json is the placeholder that echoes an error message and exits with status 1, so it always fails. There is no test directory in the repository; verification is demonstrated by the example application under example/, which is also the deployed demo.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/stephanieinez-react-responsive-navbar)Star history chart for your README
[](https://hysenlabs.com/projects/stephanieinez-react-responsive-navbar)