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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@masumdev/rn-bottom-sheet

v1.0.6

Published

A highly customizable and gesture-responsive bottom sheet component for React Native applications.

Readme

@masumdev/rn-bottom-sheet

A highly customizable and gesture-responsive bottom sheet component for React Native applications.

Sponsor

Demo

Youtube Tutorial

Features

  • 🎯 Customizable snap points (10% to 100% of screen height)
  • 🎨 Customizable background and backdrop colors
  • 📱 iOS and Android back gesture/button handling
  • 💫 Smooth animations and gestures using react-native-reanimated
  • 🔄 Context-based state management
  • 📜 Scrollable content support
  • 🔝 Dynamic height adjustment
  • 🎯 Title and content management through hooks
  • 🛡️ Safe area support

Installation

Prerequisites

Make sure you have these peer dependencies installed in your React Native project:

{
  "react": "^18.3.1",
  "react-native": "^0.76.7",
  "react-native-reanimated": "^3.16.7",
  "react-native-gesture-handler": "^2.20.2",
  "react-native-safe-area-context": "^4.12.0",
  "@react-navigation/native": "^6.x"
}

Installing peer dependencies

npm install react react-native react-native-reanimated react-native-gesture-handler react-native-safe-area-context @react-navigation/native

or

yarn add react react-native react-native-reanimated react-native-gesture-handler react-native-safe-area-context @react-navigation/native

or

bun add react react-native react-native-reanimated react-native-gesture-handler react-native-safe-area-context @react-navigation/native

or

pnpm add react react-native react-native-reanimated react-native-gesture-handler react-native-safe-area-context @react-navigation/native

Installing @masumdev/rn-bottom-sheet

npm install @masumdev/rn-bottom-sheet

or

yarn add @masumdev/rn-bottom-sheet

or

bun add @masumdev/rn-bottom-sheet

or

pnpm add @masumdev/rn-bottom-sheet

Basic Usage

  1. Wrap your app with BottomSheetProvider:
import { BottomSheetProvider } from '@masumdev/rn-bottom-sheet';
export default function App() {
  return (
    <BottomSheetProvider>
      <YourApp />
    </BottomSheetProvider>
  );
}
  1. Import useBottomSheet hook and use it in your components:
import { useBottomSheet } from '@masumdev/rn-bottom-sheet';
import { ScrollView, StyleSheet, View, Text } from 'react-native';

const ScrollableContent = () => {
  const { expand } = useBottomSheet();

  return (
    <ScrollView
      style={styles.scrollView}
      onScrollEndDrag={({ nativeEvent }) => {
        const { contentOffset, contentSize, layoutMeasurement } = nativeEvent;
        const isEndReached = contentOffset.y + layoutMeasurement.height >= contentSize.height;
        if (isEndReached) {
          expand('80%');
        }
      }}>
      {Array.from({ length: 50 }).map((_, index) => (
        <View key={index} style={styles.content}>
          <Text>Scrollable Content {index + 1}</Text>
        </View>
      ))}
    </ScrollView>
  );
};

const styles = StyleSheet.create({
  scrollView: {
    flex: 1,
    width: '100%',
  },
  content: {
    padding: 16,
    alignItems: 'center',
  },
});

export default ScrollableContent;

Advanced Usage

Custom Configuration

import { BottomSheetProvider } from '@masumdev/rn-bottom-sheet';

<BottomSheetProvider
  defaultSnapTo="50%"
  maxSnapTo="80%"
  backgroundColor="#F5F5F5"
  backDropColor="rgba(0,0,0,0.7)"
  onStateChange={(isOpen) => console.log('Sheet is open:', isOpen)}
>
  <App />
</BottomSheetProvider>

Dynamic Height Adjustment

import { useBottomSheet } from '@masumdev/rn-bottom-sheet';

const { expand, setContent } = useBottomSheet();

const showHalfSheet = () => {
  setContent(<Text>Half Sheet Content</Text>);
  expand('50%'); // Override default height
};

API Reference

BottomSheetProvider Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | defaultSnapTo | string | '70%' | Default height of the bottom sheet | | maxSnapTo | string | '100%' | Maximum height the bottom sheet can expand to | | backgroundColor | string | '#FFFFFF' | Background color of the bottom sheet | | backDropColor | string | 'rgba(0,0,0,0.5)' | Color of the backdrop overlay | | onStateChange | function | - | Callback when bottom sheet state changes |

useBottomSheet Hook

The hook returns an object with the following methods:

| Method | Type | Description | |--------|------|-------------| | isOpen | boolean | Current state of the bottom sheet | | isLoading | boolean | Loading state of the bottom sheet | | expand | function | Opens the bottom sheet with optional height | | close | function | Closes the bottom sheet | | toggle | function | Toggles the bottom sheet state | | setContent | function | Sets the content of the bottom sheet | | setSheetTitle | function | Sets the title of the bottom sheet | | setSnapTo | function | Sets the height of the bottom sheet |

License

MIT