Git Product home page Git Product logo

reactjs-repsonsive-menu's Introduction

reactjs-responsive-menu

react responsive menu component

React

Install

npm install --save reactjs-responsive-menu

Usage

import React from 'react'

// import router dom
import { BrowserRouter, Routes, Route } from "react-router-dom";

// import responsive menu library
import {ResponsiveMenuComponent} from 'reactjs-responsive-menubar';

// pages
const Home = () => (<>Home</>);
const About = () => (<>About</>);
const Contact = () => (<>Contact</>);
const Departmants = () => (<>Departmants</>);

function App() {

  // You have to add it to the root directory (App.js) with the "options" keyword
  const options = {
    isTitle: true, // Title appears or not in Menu Bar
    isLogo: false, // Logo appears or not in Menu Bar. If you make it "isLogo:true", "Logo" will be visible instead of "title"
    logoSettings: {
      logo: logo, // import logo instance
      logoWidth: 50, // logo width
      logoHeight: 50 // logo height
    },
    title: "Responsive Menu 1234", // Menu title
    navigationBackgroundColor: '', // Menu Bar background color
    routerList: [ // You can define the router definition in this format as many times as you want.
      { rName: "Home", rLink: "/home" },
      { rName: "About", rLink: "/about" },
      { rName: "Contact", rLink: "/contact" },
      { rName: "Departmants", rLink: "/departmants" },
    ]
  }

  return (
    <div className="App">      
      <BrowserRouter>
        <ResponsiveMenuComponent options={options}  />
        <Routes>      
          <Route path="/" element={<Home />} />
          <Route path="/home" element={<Home />} />
          <Route path="/about" element={<About />} />
          <Route path="/contact" element={<Contact />} />
          <Route path="/departmants" element={<Departmants />} />
        </Routes>
      </BrowserRouter>
    </div>
  );
}

export default App;

License

MIT © Faruk Mintas

reactjs-repsonsive-menu's People

Contributors

iamprocoder avatar

Stargazers

Roman avatar Fatih avatar Hasan Gazi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.