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

sidebar-react-pro

v1.1.2

Published

Welcome to our modern and responsive sidebar solution! Designed to adapt seamlessly across all devices and screen sizes, our sidebar enhances user experience by providing easy navigation and accessibility in various contexts.

Downloads

35

Readme

Modern and Responsive Sidebar

Welcome to our modern and responsive sidebar solution! Designed to adapt seamlessly across all devices and screen sizes, our sidebar enhances user experience by providing easy navigation and accessibility in various contexts.

Key Features:

  • Responsive Design: Ensures optimal viewing and interaction experience on any device, from desktops to mobile phones.
  • Sleek and Intuitive: Combines modern aesthetics with intuitive functionality, making navigation straightforward and enjoyable.
  • Customizable: Tailor the sidebar to fit your application's unique design requirements effortlessly.

-Demo

main.jsx || main.js

You need the SidebarProvider in your main file for the application to work.

import React from "react";
import ReactDOM from "react-dom/client";
import App from "./App.jsx";
import "./index.css";
import { SidebarProvider } from "./components/SidebarProvider.jsx";

ReactDOM.createRoot(document.getElementById("root")).render(
  <React.StrictMode>
    {/*This is the component that you need*/}
    <SidebarProvider>
      <App />
    </SidebarProvider>
  </React.StrictMode>
);

You need tailwind

-Tailwind for react and vite When you have Tailwind in your project, you may need to add a line of code to the tailwind.config.js file if necessary.

This is line that you need to add

"./node_modules/sidebar-react-pro/dist/**/*.{js,ts,jsx,tsx}",

This is how your code needs to look

/** @type {import('tailwindcss').Config} */
export default {
  content: [
    "./index.html",
    "./src/**/*.{js,ts,jsx,tsx}",
    "./node_modules/sidebar-react-pro/dist/**/*.{js,ts,jsx,tsx}",
  ],
  theme: {
    extend: {},
  },
  plugins: [],
}

Sidebar

import {
  SideBar,
  ButtonBar,
  ButtonDropDownBar,
  DropDownOptions,
} from "sidebar-react-pro";

function App() {
  return (
    <>
      <SideBar
        Name="Moaibi"
        src="https://res.cloudinary.com/dcqvg21nk/image/upload/v1714868174/Portfolio/RESMOAIBI/s1okzium52134zpcetm9.png"
      >
        <ButtonBar icon={<HomeIcon />}  TxtColor="text-white">Home</ButtonBar>
        <ButtonDropDownBar icon={<HomeIcon />  TxtColor="text-white"} Name={"Products"}>
          <DropDownOptions  TxtColor="text-white">Product1</DropDownOptions>
          <DropDownOptions  TxtColor="text-white">Product2</DropDownOptions>
          <DropDownOptions  TxtColor="text-white">Product3</DropDownOptions>
          <DropDownOptions  TxtColor="text-white">Product4</DropDownOptions>
        </ButtonDropDownBar>
        {/*You can also use TxtColor for change the color of the text of the bottons*/}
      </SideBar>
    </>
  );
}

export default App;

Sidebar props

import { SideBar } from "sidebar-react-pro";

function App() {
  return (
    <>
      <SideBar
        src="https://res.cloudinary.com/dcqvg21nk/image/upload/v1714868174/Portfolio/RESMOAIBI/s1okzium52134zpcetm9.png"
        // URL for your company logo
        Name="Moaibi"
        // Name of your company
        TxtColor="text-white"
        //This is for change the color of the company Name
        ButtonColor="bg-[#a87abe]"
        // Background color of the sidebar toggle button (open/close button)
        BgColor="bg-[#1c1c1c]"
        // Background color of the sidebar; defaults to #1c1c1c if not specified
        BgImage="bg-[url('https://res.cloudinary.com/dcqvg21nk/image/upload/v1713594373/Portfolio/kh7azy142fknzrmstqed.jpg')]"
        // URL for a background image to be used in the sidebar
      ></SideBar>
    </>
  );
}

export default App;

Sidebar Close on Screen Click

import { SideBar } from "sidebar-react-pro";

function App() {
  return (
    <>
      <SidebarClose>
        {/* Clicking anywhere inside this div will close the sidebar when in phone format */}
        {/* Add your main content here */}
      </SidebarClose>
    </>
  );
}

export default App;