npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-responsive-sidebar-menu

v1.1.0

Published

A simple responsive sidebar for ReactJS

Downloads

19

Readme

react-responsive-sidebar-menu

Travis npm package Coveralls

Required

  • react-router-dom@^6.0.2

Installation

# npm
npm i react-responsive-sidebar-menu --save
# yarn
yarn add react-responsive-sidebar-menu

Usage

import React, { Component } from "react";
import ReactSearchBox from "react-search-box";
export default class App extends Component {
  menuItems = [
    {
      path: "/",
      text: "Dashboard",
      tooltip: "Dashboard",
      icon: "bx bx-grid-alt",
    },
    {
      path: "/users",
      text: "Users",
      tooltip: "Users",
      icon: "bx bx-user",
    },
    {
      path: "/users",
      text: "Messages",
      tooltip: "Messages",
      icon: "bx bx-chat",
    },
    {
      path: "/users",
      text: "Settings",
      tooltip: "Settings",
      icon: "bx bx-cog",
    },
  ];
  options = {
    title: "React RSB",
    icon: "bx bxl-react icon",
    logo: "https://lucassenarj.github.io/favicon.ico",
  }
  user={
    name: "Lucas Sena",
    avatar: "https://lucassenarj.github.io/images/author.jpg",
    status: "Frontend developer",
    onLogout: () => console.log("logout"),
  }
  render() {
    return (
      <ResponsiveSidebar
        menuItems={this.menuItems}
        options={this.options}
        user={this.user}
      />
    );
  }
}

Props

| Prop | Description | | ----------------------- | ---------------------------------------------------------------------------------------------------------------- | | menuItems | An array of objects which acts as the source of data for the menu. This prop is required | | menuItems.path | Path when users will be redirected when clicked on a menu item. This prop is required | | menuItems.text | Text which act as name or title for menu items. This prop is required | | menuItems.tooltip | Text which act as tooltip when sidebar is closed for menu items. This prop is required | | menuItems.icon | Boxicon class name. This prop is required | | options | Object which acts as source for project settings. This prop is required | | options.title | Project or company title. This prop is required | | options.icon | Boxicon path for company or project icon | | options.logo | Image path company or project logo | | user | Object which acts as source for user. This prop is required | | user.name | User name. This prop is required | | user.avatar | User picture, image, or avatar. This prop is required | | user.status | User subtitle or user role. This prop is required | | user.onLogout | A function which acts as a callback when the logout button is click. This prop is required |

Built With

  • React - A JavaScript library for building user interfaces
  • React-Router-Dom - React Router DOM enables you to implement dynamic routing in a web app.
  • BoxIcons - Free collection of carefully crafted open source icons

License

MIT Licensed. Copyright (c) Lucas Sena 2021.