React Scrolling NavBar
This Repo is not actively maintained! Please do not use in professional environment!
This is a React navbar component based on react-scroll. While this component is good, it doesn't support mobile well, especially when there are many items in navbar. That's why we need another navbar design for more responsiveness, mobile friendliness.
A quick screenshot example is shown below. desktop
Installation
$ npm install --save react-scrolling-nav
Run Example locally
$ npm install
$ npm run watch
Open localhost:8080, you'll see a simple example.
Usage
ES6:
Define an array that contains all of your navbar items in format { label: "item1", target: "item-1" }
, where label
is the text that you want to show on the navbar, and target
is mapped to the name
property in ElementWrapper
. You should wrap all of the components to which you want to be navigated into ElementWrapper
.
Options
Except coverWidth
, all values above are the default, respectively.
TODO
- Add eslint and refactor.
- Add unit tests.
Contribution
You
- Create your own branch, let's say
new-feature
and Switch to the branch.
- Coding with
webpack-dev-server
.
npm run watch
- Build Github static page.
npm run build
- Push to Github.
git push origin new-feature
- Get your PR reviewed, approved and merge.
Admin
- Change local branch to master and pull remote.
git checkout master
git pull
- Update version, then build and publish to npm.
npm version [major|minor|patch]
npm run publish