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-native-slide-bottomsheet

v1.0.11

Published

React Native Slide BottomSheet is a customizable component for creating elegant bottom sheets in your React Native applications. It provides a great user experience with smooth animations and flexible height options.

Downloads

30

Readme

React Native Slide BottomSheet

React Native Slide BottomSheet is a customizable component for creating elegant bottom sheets in your React Native applications. It provides a great user experience with smooth animations and flexible height options.

Features

  • Customizable styles to match your app's design and theme.
  • Support for scrollable content within the bottom sheet.
  • Configurable backdrop with adjustable opacity and color.
  • Optional handle bar for easy interaction.
  • Responsive height options, including fixed height and percentage-based height.
  • Event callbacks for closing the bottom sheet and handling backdrop press.

Example

Installation

You can install package using npm or yarn:

npm install react-native-slide-bottomsheet

or

yarn add react-native-slide-bottomsheet

Usage

To use the BottomSheet component in your React Native application, simply import it and include it in your JSX:

import React from "react";
import { View, Text } from "react-native";
import BottomSheet from "react-native-slide-bottomsheet";

const App = () => {
  return (
    <View>
      <Text>React Native Slide Bottomsheet</Text>
      <BottomSheet
        visible={true}
        onClose={() => console.log("Bottom sheet closed")}
      >
        <View>
          <Text>Content inside the bottom sheet</Text>
        </View>
      </BottomSheet>
    </View>
  );
};

export default App;

Props

The following table describes the available props for the React Native BottomSheet component:

| Prop | Type | Description | | -------------------------------- | --------------------------------- | ------------------------------------------------------------------------- | | visible | boolean | Whether the bottom sheet is visible or not. | | onClose | () => void | Callback function when the bottom sheet is closed. | | children | React.ReactNode | Content of the bottom sheet. | | height | number | string | Height of the bottom sheet (can be a number or a string with percentage). | | scrollable | boolean | Whether the content of the bottom sheet is scrollable. | | animationDuration | number | Duration of the animation for opening/closing the bottom sheet. | | backdrop | object | Configurations for the backdrop behind the bottom sheet. | | backdrop.backdropOpacity | number | Opacity of the backdrop. | | backdrop.backdropColor | string | Color of the backdrop. | | style | object | Custom styles for the bottom sheet container. | | style.backgroundColor | string | Background color of the bottom sheet. | | style.borderTopLeftRadius | number | Top left border radius of the bottom sheet. | | style.borderTopRightRadius | number | Top right border radius of the bottom sheet. | | style.borderColor | string | Border color of the bottom sheet. | | style.borderWidth | number | Border width of the bottom sheet. | | style.shadowColor | string | Shadow color of the bottom sheet. | | style.shadowOffset | { width: number, height: number } | Shadow offset of the bottom sheet. | | style.shadowRadius | number | Shadow radius of the bottom sheet. | | style.elevation | number | Elevation of the bottom sheet (Android only). | | handleBarVisible | boolean | Whether to show the handle bar at the top of the bottom sheet. | | handleBarStyle | object | Custom styles for the handle bar. | | handleBarStyle.backgroundColor | string | Background color of the handle bar. | | handleBarStyle.width | number | Width of the handle bar. | | handleBarStyle.height | number | Height of the handle bar. | | onBackdropPress | () => void | Callback function when the backdrop is pressed. |

Contributing

Contributions are welcome! If you have any ideas, suggestions, or bug reports, please open an issue or submit a pull request. Let's make this package even better together!

License

This project is licensed under the GNU GENERAL PUBLIC LICENSE Version 3.