1.1.45 • Published 1 year ago

shiny-navbar v1.1.45

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Shiny Navbar

A navbar component built with React⚛️ + TypeScript

Tech Stack

  • React
  • TypeScript
  • SCSS
  • Framer Motion

How to use?

Get the package with,

npm install shiny-navbar

or

yarn add shiny-navbar

We have a prop for now, it named items

items, contains the menu items and actions. Required interface is on below.

interface NavbarItem {
  customClass?: string
  label: string
  onPerform?(event, item, itemIndex): void
  url?: string
}
  • customClass, gives custom extra class to item.
  • label, holds the visible string for item.
  • onPerform, is a simple onClick event.
  • url is for extra onClick handler. If item has url, it goes on new tab.

Call it on your project:

import React from "react";
import { ShinyNavbar } from "shiny-navbar";
import 'shiny-navbar/dist/shiny-navbar.css';

const App = () => {
  const config: NavbarItem[] = [
    {
      label: 'Main',
    },
    {
      label: 'Photos',
    },
    {
      label: 'About',
    },
    {
      label: 'Guestbook',
    }
  ]
  
  return <div>
    <ShinyNavbar items={config} />
  </div>
}
1.1.45

1 year ago

1.1.44

1 year ago

1.1.43

1 year ago

1.1.42

1 year ago

1.1.41

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.0.10

1 year ago