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-pretty-dropdown

v1.0.8

Published

Customizable dropdown menu for React.

Downloads

13

Readme

React Pretty Dropdown

Customizable dropdown menu for React.

Screenshot

Installation

npm install react-pretty-dropdown

Usage

Import the component and set menu items using anchor tags, Link from react-router-dom, or buttons. It doesn't matter the element you use because they'll have the same style.

import Dropdown from 'react-pretty-dropdown';

<Dropdown icon="ellipsis-vertical">
<a href="#">Item 1</a>
<a href="#">Item 2</a>
<a href="#">Item 3</a>
</Dropdown>

Props

background - Background color. textColor - Text color. fontSize - Font size. hoverBackground - Background color on hover. hoverFontColor - Font color on hover. activeBackground - Background color of active items. activeFontColor - Font color of active items. icon - Menu button icon. Available options: "ellipsis-vertical", "ellipsis", "bars", and "caret-down". iconSize - Menu icon size. buttonWidth - Menu button width. buttonBorderOnHover - Menu button border on hover. Example: "1px solid #0054a8". buttonBorderOnFocus - Menu button border on focus. Example: "1px solid #0054a8". buttonFloat - Only used to align the menu button to the right. Set it to "float-end". menuPosition - Menu horizontal position. The default value is "35px", which leaves no gap between the menu button and items. width - Width of the whole component.

<Dropdown
icon="ellipsis-vertical"
background="lightblue"
textColor="black"
fontSize="1.5rem"
iconSize="1.7rem"
hoverBackground="green"
hoverFontColor="white"
activeBackground="green"
activeFontColor="white"
width="200px"
buttonFloat="float-end"
>
<a href="#">Item 1</a>
<a href="#">Item 2</a>
<a href="#">Item 3</a>
</Dropdown>