react-light-menu

    1.0.1 • Public • Published

    react-light-menu

    Modern and easy to use menu component for react-router. Heavily inspired by react-metismenu

    NPM JavaScript Style Guide

    Demo

    Install

    npm install --save react-light-menu

    Or using yarn:

    yarn add react-light-menu

    Requirements

    Because light-menu written completely using hooks, which is a feature of never react and react-router, here's some requirements:

    • React v16.8.0+

    • React Router v5.1.0+

    Usage

    import React, { Component } from 'react'
     
    import LightMenu from 'react-light-menu'
     
    class Example extends Component {
      render () {
        return (
          <LightMenu items={[ { title: 'Home', to: '/' } ]} />
        )
      }
    }

    TODO

    • Move active items info into context
    • Class names configuration
    • Tests
    • Move react-router part in separate library
    • Next.js router support

    Development

    To run examples locally, you will need to npm link react in example folder, otherwise everything will fail:

    cd example
    npm link ../node_modules/react

    Thanks

    H.Alper Tuna - react-metismenu, where I took some things like DOM structure and default style

    License

    MIT © Andrey Viktorov

    Keywords

    none

    Install

    npm i react-light-menu

    DownloadsWeekly Downloads

    1

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    96.7 kB

    Total Files

    10

    Last publish

    Collaborators

    • andv