Skip to content
This repository has been archived by the owner on Feb 18, 2023. It is now read-only.
/ react-light-menu Public archive

Modern and easy to use menu component for react-router

Notifications You must be signed in to change notification settings

4ndv/react-light-menu

Repository files navigation

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

About

Modern and easy to use menu component for react-router

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published