New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-native-raw-bottom-sheet

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-raw-bottom-sheet

Add Your Own Component To Bottom Sheet Whatever You Want (Android & iOS)

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
29K
decreased by-0.39%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-raw-bottom-sheet

npm version npm downloads

  • Super Lightweight Component
  • Smooth Animation
  • Add Your own Component To Bottom Sheet
  • Customize Whatever You Like
  • Support Gesture Swipe Down
  • Support All Orientations
  • Support Both Android And iOS
Showcase iOSShowcase Android

Installation

npm i react-native-raw-bottom-sheet --save

or

yarn add react-native-raw-bottom-sheet

Example

import React, { Component } from "react";
import { View, Text, Button } from "react-native";
import RBSheet from "react-native-raw-bottom-sheet";

class Example extends Component {
  render() {
    return (
      <View style={{ flex: 1, marginTop: 50, alignItems: "center" }}>
        <Button
          title="OPEN BOTTOM SHEET"
          onPress={() => {
            this.RBSheet.open();
          }}
        />
        <RBSheet
          ref={ref => {
            this.RBSheet = ref;
          }}
          height={300}
          duration={250}
          customStyles={{
            container: {
              justifyContent: "center",
              alignItems: "center"
            }
          }}
        >
          <YourOwnComponent />
        </RBSheet>
      </View>
    );
  }
}

const YourOwnComponent = () => <Text>Your Pretty Component Goes Here</Text>;

export default Example;

Props

PropTypeDescriptionDefault
heightnumberHeight of Bottom Sheet260
durationnumberDuration of Bottom Sheet animation300 (ms)
closeOnSwipeDownbooleanUse gesture swipe down to close Bottom Sheettrue
closeOnPressMaskbooleanPress the area outside to close Bottom Sheettrue
onClosefunctionCallback function when Bottom Sheet was closed
customStylesobjectCustom style to Bottom Sheet{}

Available Custom Style

customStyles: {
  wrapper: {...}, // The Background of Component
  container: {...} // The Container of Bottom Sheet
}

Methods

Method NameDescription
openOpen Bottom Sheet
closeClose Bottom Sheet

Note

Always set ref to RBSheet and call each method by using this.RBSheet.methodName() like example above.

Give me a Star

If you think this project is helpful just give me a ⭐️ Star is enough because i don't drink coffee :D

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Author

Made with ❤️ by NY Samnang.

Keywords

FAQs

Package last updated on 08 Feb 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc