# react-native-scrollable-menu

> React native horizontal scrollable menu

Latest version **2.0.0** (published 2023-01-16) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-native-scrollable-menu
pnpm add react-native-scrollable-menu
yarn add react-native-scrollable-menu
bun add react-native-scrollable-menu
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2023-01-16 |
| First published | 2023-01-06 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 6.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Shinu VS |
| Maintainers | shinuvs2007 |
| Keywords | react, react, native, scrollable, menu, horizontal, scrollable, menu |

## Links

- npm: https://www.npmjs.com/package/react-native-scrollable-menu
- npm.io page: https://npm.io/package/react-native-scrollable-menu

## Dependencies (2)

- [react](https://npm.io/package/react.md) 18.1.0
- [react-native](https://npm.io/package/react-native.md) 0.70.5

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2023-01-16
- 1.0.9 — 2023-01-14
- 1.0.8 — 2023-01-14
- 1.0.7 — 2023-01-14
- 1.0.6 — 2023-01-11
- 1.0.5 — 2023-01-11
- 1.0.4 — 2023-01-06
- 1.0.3 — 2023-01-06
- 1.0.2 — 2023-01-06
- 1.0.1 — 2023-01-06
- 1.0.0 — 2023-01-06

## README

# Horizontal Scrollable Menu

Horizontal Scrollable menu is a React native library for listing the horizontal menus .

## Installation

Use the package manager to install the package.

```bash
npm install react-native-scrollable-menu
```

## Usage

```python
import React from "react";
import { HorizontalMenu } from 'HorizontalMenu';

export default function App() {

    const data = [{key : 'Bread'}, {key : 'Piza'}, {key : 'Burgers'}, {key : 'Cafe'}, {key : 'Salad'}, {key : 'Starters'}, {key: 'Vegetarian Curries'}, {key: 'Non Vegetarian'}]
    
    const menuItemSelected = (selectedItem) => {
        // Handle the action
    }
  
    return (
      <View style={{marginTop: 30}}>
        <HorizontalMenu 
          data={data}
          displayKey='key'
          borderRadius={5} 
          borderWidth={0}
          backgroundColor='#D3D3D3'
          borderColor='#5b5b5b'
          fontSize={15}
          selectedMenuColor="#22AF44"
          selectedMenuBorderColor="red"
          fontColor="#36454F"
          selectedMenuFontColor="#ffffff"
          menuSpacing={5}
          width={100}
          textAlign='center'
          onPress={(value) => menuItemSelected(value)}
        />
      </View>
    );
  }
```
## Release Note 2.0.0
* More props added so that developers can customize menu as per your needs. Please refer props table for more information.
* Active menu highlight issue fixed.

## Report bug fix

Please report the bugs to shinuvs2007@outlook.com

## Props

| Key                       | value                                                                           |
| :------------------------:| :------------------------------------------------------------------------------:| 
| data                      | pass the menu array of objects                                                  |
| displayKey                | set which key you need to display from the object                               |
| borderRadius              | set borderRadius 0 for square shape and set another value to round shaped menu  |
| borderWidth               | set borderWidth to display default border                                       |
| borderColor               | set borderColor to display default border color                                 |
| selectedMenuBorderColor   | set selectedMenuBorderColor to change selected menu border color                |
| selectedMenuColor         | set selectedMenuColor to change selected menu color                             |
| fontSize                  | set fontSize to adjust font size                                                |
| width                     | set custom menu width using width props                                         |
| height                    | set custom menu height using height props                                       |
| menuSpacing               | use menuSpacing props to set spacing between menus                              |
| textAlign                 | use textAlign props to set text align                                           |
| onPress                   | onPress function will return selected menu object                               |


## Demo
![image](https://drive.google.com/uc?export=view&id=1xDQCO5sL1sDyLZD4ZYfol0dsfGVyu_-X)

## License

[MIT](https://choosealicense.com/licenses/mit/)

---
_Source: https://npm.io/package/react-native-scrollable-menu · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
