Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pierreamgabriel/react-pretty-dropdown

Customizable dropdown menu for React.
https://github.com/pierreamgabriel/react-pretty-dropdown

dropdown dropdown-menu react react-dropdown reactjs

Last synced: 6 days ago
JSON representation

Customizable dropdown menu for React.

Awesome Lists containing this project

README

        

# React Pretty Dropdown

Customizable dropdown menu for React.

## Screenshot



## Installation

```bash
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.

```javascript
import Dropdown from 'react-pretty-dropdown';

Item 1
Item 2
Item 3

```

## 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.

```javascript

Item 1
Item 2
Item 3

```