0.0.8 • Published 4 years ago

@tmnrp/reactjs-navbar v0.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

@tmnrp/reactjs-navbar

@tmnrp/reactjs-navbar is a lightweight markup rendering responsive configurable navigationbar.

Features

  • Renders responsive navigationbar.
  • Dynamic menu items.
  • Configurable media query breakpoint to manage the menu length.
  • Functional Light/Dark mode indicator.

Examples link

https://tmnrp.github.io/packages/

Installation link

$ npm i @tmnrp/reactjs-navbar

Properties

npm i @tmnrp/reactjs-navbar is currently extended with the following properties.

PropertiestypeDescription
pageDetailsArray of ObjectsProvide string to key text, that needs to be displayed
isLightbooleanProvide false to turn on dark mode
breakpointintegerProvide min with value to activate the breakpoint
heightintegerProvide height for navbar and the menu items
bgColorHEX/ColorProvide Hex value or color shade for background color
fontColorHEX/ColorProvide Hex value or color shade for font color
primaryColorHEX/ColorProvide Hex value or color shade for primary color
themeCallbackfunctionProvide callback function to receive the change of theme mode
onPageClickCallbackfunctionProvide callback function to receive current page (menu item)

Implementation

import Navbar from "@tmnrp/reactjs-navbar";
const history = useHistory();
const pageDetails = [{text: "Home"},{text: "About"},{text: "Contact"}];
<Navbar
    pageDetails={pageDetails}
    isLight={true}
    breakpoint={742}
    height="70px"
    bgColor="#374046"
    fontColor="white"
    primaryColor="#F34236"
    themeCallback={(isLight) => {console.log("Is it light mode", isLight)}}
    onPageClickCallback={(e, page) => {
        history.push(`/packages/${page}`);
    }}
/>

Todos

  • More customization on UI/UX
  • Add themes
  • Add UTC

License

MIT

0.0.8

4 years ago

0.0.7

4 years ago

0.0.5

4 years ago

0.0.6

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago