# react-native-js-bottom-sheet

> Modal bottom sheet component for Android and iOS that follows the guidelines of Material Design.

Latest version **1.1.0** (published 2018-11-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-js-bottom-sheet
pnpm add react-native-js-bottom-sheet
yarn add react-native-js-bottom-sheet
bun add react-native-js-bottom-sheet
```

## 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 | 1.1.0 |
| Published | 2018-11-13 |
| First published | 2017-10-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 161.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 30 |
| Author | Antonio Moreno Valls |
| Maintainers | apsl |
| Keywords | react, react-native, bottom, sheet, android, ïos, react-component, bottom-sheet, multiplatform, bottomsheet |

## Links

- npm: https://www.npmjs.com/package/react-native-js-bottom-sheet
- Repository: https://github.com/InterfaceKit/react-native-js-bottom-sheet
- Homepage: https://github.com/InterfaceKit/react-native-js-bottom-sheet#readme
- Issues: https://github.com/InterfaceKit/react-native-js-bottom-sheet/issues
- npm.io page: https://npm.io/package/react-native-js-bottom-sheet

## Dependencies (4)

- [prop-types](https://npm.io/package/prop-types.md) ^15.5.10
- [@types/prop-types](https://npm.io/package/@types/prop-types.md) ^15.5.1
- [react-native-modalbox](https://npm.io/package/react-native-modalbox.md) ^1.4.2
- [@types/react-native-modalbox](https://npm.io/package/@types/react-native-modalbox.md) ^1.4.2

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

- 1.1.0 (latest) — 2018-11-13
- 1.0.0 — 2018-02-02
- 0.1.1 — 2017-12-27
- 0.1.0 — 2017-10-19

## README

# react-native-js-bottom-sheet

Modal bottom sheet component for Android that follows the guidelines of Material Design.

https://material.io/guidelines/components/bottom-sheets.html

<p align="center">
<img src="./example.png" alt="Stepper" width="400">
</p>

## Getting started

```sh
$ yarn add react-native-js-bottom-sheet
```

## Usage

Code refers to the previous image example:

```js
/* @flow */

import React, { Component } from 'react'
import { AppRegistry, StyleSheet, Text, View, Button } from 'react-native'
import BottomSheet from 'react-native-js-bottom-sheet'
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons'
import Entypo from 'react-native-vector-icons/Entypo'

export default class Example extends Component {
  bottomSheet: BottomSheet

  _onPressButton = () => {
    this.bottomSheet.open()
  }

  render() {
    return (
      <View style={styles.container}>
        <Button title="Open" onPress={this._onPressButton} />
        <BottomSheet
          ref={(ref: BottomSheet) => {
            this.bottomSheet = ref
          }}
          itemDivider={3}
          backButtonEnabled={true}
          coverScreen={false}
          title="Create"
          options={[
            {
              title: 'Document',
              icon: (
                <MaterialCommunityIcons
                  name="file-document-box"
                  color="#2186fa"
                  size={24}
                />
              ),
              onPress: () => null
            },
            {
              title: 'Spreadsheet',
              icon: <Entypo name="spreadsheet" color="#43a047" size={24} />,
              onPress: () => null
            },
            {
              title: 'Folder',
              icon: (
                <MaterialCommunityIcons name="folder" color="grey" size={24} />
              ),
              onPress: () => null
            },
            {
              title: 'Upload photos or videos',
              icon: (
                <MaterialCommunityIcons
                  name="cloud-upload"
                  color="grey"
                  size={24}
                />
              ),
              onPress: () => null
            },
            {
              title: 'Use Camera',
              icon: (
                <MaterialCommunityIcons name="camera" color="grey" size={24} />
              ),
              onPress: () => null
            }
          ]}
          isOpen={false}
        />
      </View>
    )
  }
}
```

## API

| Prop              | Type          | Required | Description                                                                                                              |
| ----------------- | ------------- | -------- | ------------------------------------------------------------------------------------------------------------------------ |
| coverScreen       | bool          | No       | Will use RN Modal component to cover the entire screen wherever the modal is mounted in the component hierarchy          |
| backButtonEnabled | bool          | No       | Close modal when receiving back button event                                                                             |
| height            | number        | No       | Height of the container. By default it has no height, due to container grows automatically depending of list of elements |
| title             | string        | Yes      | Title displayed in top of list                                                                                           |
| options           | Array<Object> | Yes      | Array of objects to display options list                                                                                 |
| fontFamily        | string        | No       | Used to display values. By default is Roboto                                                                             |
| titleFontFamily   | string        | No       | Title font family                                                                                                        |
| isOpen            | bool          | No       | Specifies if bottom sheet is open by default                                                                             |
| itemDivider       | number        | No       | Insert an item separator below the specified item number                                                                 |

## License

MIT License

Copyright (c) 2017 InterfaceKit

## Author

Antonio Moreno Valls `<amoreno at apsl.net>`

Built with 💛 by [APSL](https://github.com/apsl).

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