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-sliding-sidemenu

v1.1.8

Published

Customisable Responsive sliding sidebar menu , can be easily intigrated within application.

Downloads

14

Readme

react-sliding-sidemenu

react sliding sidemenu is a fully customizable with zero dependancy, written in pure JS and CSS responsive sidebar menu. this will gives a quick access to menu links to navigate through different routes in application.

Live Demo

Installation

npm install react-sliding-sidemenu --save

customisable features

  • color of the text inside the sidebar menu
  • margin-top of the sidebar
  • font style
  • order of content inside sidebar (profile,description and links sections)
  • upto 2 levels of sub links
  • customisable expand icon style
  • links will support react-router
  • profile and description sections can be hidden if not required.
  • full view of the profile pic on click.

Using react-sliding-sidemenu

import componnent from :- react-sliding-sidemenu_ in your component. pass props to the component with data and avaialbe props to customise and you are done.

import React from 'react'
import ReactDOM from 'react-dom'
import Sidebar from 'react-sliding-sidemenu'

class App extends React.Component {
    render() {
        return (
            <div>
            //call the Sidebar component with props
                <Sidebar {...props}>
            </div>
        );
    }
}

ReactDOM.render(
    <App/>,
  document.getElementById('root')
)

Available features from props

functions

onLinkItemClick(clickedLink)

this function can be passed as props to the component , which will be executed on click of the menu links. function will recieve an arguement which holds the details of the clicked link. Note to use above function pass href for that link as "#".At a time either href or onClick one of can be used.

dataForLinks sample object

href below indicates the navigation to be routed on click on the links.(same as href for anchor tag) **Note : ** all properties are case sensitive.

dataForLinks:
        [
            {
                mainLink: "Main Link 1",
                href: "pass the link",
                subLinks: [
                    {
                        subLink: "Sub Link 1",
                        href: "pass the link",
                        childLinks: [
                            {
                                childLink: 'Child Link 1',
                                href: 'pass the link'
                            },
                            {
                                childLink: 'Child Link 2',
                                href: 'pass the link'
                            }
                        ]
                    },
                    {
                        subLink: "Sub Link 2",
                        href: "pass the link",
                        childLinks: []
                    },
                    {
                        subLink: "SubLink 3",
                        href: "pass the link",
                        childLinks: []
                    }
                ]
            },
            {
                mainLink: "Main Link 3",
                href: "pass the link",
                subLinks: []
            }
         ]