0.1.3 • Published 6 years ago

react-flexbox-navbar v0.1.3

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

React Flexbox Navbar

A simple navbar you can import in to your project without having to import a large library like React Bootstrap or any other alternative. The navbar is fully responsive and provides a toggle menu when at a lower screen width. This menu will be optional in my next update. Just pass the Navbar a few simple props and you'll be up and running.

This is my first time having a go at building a standalone React component, so bear with me as I devote more time to making it more customisable and polished. I'm currently using it in another one of my projects in my repo so I thought it would be best to extract it and let it live on it's own.

Get it in to your project

npm install react-flexbox-navbar --save

Example

<Navbar
    title="react-navbar" 
    color="#19647E"
    fixedTop
>
    <Navbar.NavSection>
        <Navbar.NavItem link="www.google.co.uk">
            Hello
        </Navbar.NavItem>
    </Navbar.NavSection>
    <Navbar.NavSection isRight>
        <Navbar.NavItem>
            I'm on the right
        </Navbar.NavItem>
        <Navbar.NavItem>
            Me too
        </Navbar.NavItem>
    </Navbar.NavSection>
</Navbar>

API

Navbar

PropDescriptionTypeDefault
titleThe title you want displayed at on the left of the navbarstring""
colorThe colour you wish to apply to the navbar - in the next update, the text will automatically be an invert of this colourstring (Hex value)#2C363F
fixedTopWhether you want the navbar to be fixed to the top of the pagebooleanfalse

NavSection

NavItem

Navbar.Search (May become NavSection.Search)

PropDescriptionTypeOptionsDefault/Required
onSearchSubmitThe call back function for your search queryfunctionrequired
placeholderPlaceholder text to appear in the search inputstringSearch...
widthWidth of the search inputstring300px
iconPositionPosition of the icon in the search inputstringright left noneleft

This is currently under development so these will have API details very soon.

Coming soon

  • Search component
  • Automatic font colouring
  • Optional toggle menu
  • Layout customisations
  • Dropdown component
  • Sidebar
  • Custom height and more.

    This is a work in progress and is not ready to use in your app.

    I'd be happy with any contributions, so feel free to make a pull request!

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

1.1.0

6 years ago