react-basics nav component
npm install rb-navbarA React Basics Navbar component. Stateless, fully optimized with css animations, highly customizable, SEO support with Schemas.org and Mobile tap support.
Into your project's root directory run the following command:
npm
``console`
npm i -P rb-navbar
Yarn
`console`
yarn add rb-navbar
This package only has 3 dependencies:
- react@16.2.0font-awesome@4.7.0
- react-device-detect@1.0.0
-
Navbar is one of the components inside React Basics, so if you want test it, go https://edgravill.github.io/react-basics and see it working.
> The website is under construction
Component takes 100% of the parent's width.
`javascript
import React from 'react';
import Nav from 'rb-navbar';
const Index = () => (
Dropdown elements also are supported
See in
work section below`javascript
import React from 'react';
import Nav from 'rb-navbar';const Index = () => (
backgroundColor="#ecf0f1"
color="#34495e"
links={[{
href: '/',
title: 'Home',
icon: 'home'
}, {
href: '/about',
title: 'About Us',
}, {
href: '/work',
title: 'Our Work',
links: [{
href: '/work/web',
title: 'Web',
}, {
href: '/work/mobile',
title: 'Mobile',
}]
}]}
/>
);
`API
|Prop|Required|Type|Default|Description|
|----|--------|----|-------|-----------|
|AnchorComponent|
false|React$Element|undefined|Custom anchor component, this is useful when integrates a react router.|
|backgroundColor|false|string|'#4A5459'|Background of the Navbar.|
|brand|false|Object|undefined|Object with the brand or company basic information. It just display the info. See Object definition below.|
|color|false|string|'#ecf0f1'|Color of all fonts in Navbar.|
|height|false|number|48|Height of the Navbar.|
|links|false|ArrayGoals
- [x] Mobile tap to open dropdown (Since v1.0.0)
- [x] SEO support with Schemas.org (Since v1.0.0)
- [x] Support custom anchor tag. For routers (Since v1.1.0)
- [ ] Integration of other icons (Under develop)
- [ ] Mobile responsive (Under develop)
> looking for more? - Do a pull request with your proposals ;)
Collaborators
- Eduardo Grajales Villanueva @EdGraVill
> If you want to collaborate with this or another exist or new component inside React Basics, first do a pull request and then email me: edgravill@gmail.com
If you want pull request some changes, don't forget build it firt with the following command:
npm
`console
npm run build
`Yarn
`console
yarn build
`Once you're a collaborator don't forget 3 rules:
1. Version are
Mayor (If APIs are deleted or create new one) . Medium (If APIs changes without changing name) . Minimum` (If do some hotfix, change Documentation or develop configurations). This is because all 1.x.x are compatible, but are incompatible with 2.x.xDon't forget join discussion on Slack
MIT License
Copyright (c) 2018 Eduardo Grajales Villanueva
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.