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

react-native-bottomsheet-navigation

v0.0.6

Published

Simplest bottomsheet navigation package for react-native.

Readme

react-native-bottomsheet-navigation

Simplest bottomsheet navigation package for React Native. Convert any component into a bottomsheet. Wrap your app with the provided wrapper component and display any component as a bottomsheet from anywhere in the app.


Features

  • Lightweight and simple to integrate.
  • Push and navigate between bottomsheet components seamlessly.
  • Minimal configuration required.
  • Fully customizable components and behavior.
  • Supports swipe-to-dismiss functionality.

Installation

To install the package, run:

npm install react-native-bottomsheet-navigation

Additionally, install and configure react-native-gesture-handler as it is a required dependency for detecting swipe gestures.

npm install react-native-gesture-handler

Important Setup Instructions

  1. The app must be wrapped with GestureHandlerRootView to enable gesture handling for swipe-to-dismiss functionality.

  2. It is recommended to wrap the entire app with BottomsheetWrapper to ensure proper functionality of the bottomsheet navigation. Without this wrapper, the sheets cannot be displayed.

Example:

import { GestureHandlerRootView } from 'react-native-gesture-handler';
import { BottomsheetWrapper } from "react-native-bottomsheet-navigation";

function App() {
  return (
    <GestureHandlerRootView style={{ flex: 1 }}>
      <BottomsheetWrapper>
        {/* Rest of your app code */}
      </BottomsheetWrapper>
    </GestureHandlerRootView>
  );
}

API

Methods

| Function | Description | Arguments | Returns | |-----------------|-------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------|---------------| | pushSheet | Pushes a new bottomsheet to the stack. | SheetComponent: React.Component, sheetParams: object | SheetHandler| | navigateToSheet | Navigates to an existing bottomsheet (if already in the stack) or pushes a new one to the top. | Component: React.Component, sheetParams: object, sheetName: string | SheetHandler| | closeAll | Closes all open bottomsheets. | None | None |

Types

| Type | Description | |-----------------|-------------------------------------------------------------------------------------------------------| | SheetHandler | Handler object for a bottomsheet instance, containing close and isOpened methods. | | SheetParams | Parameters passed to the bottomsheet component as sheetParams props. |


Sheet Component Props

Each bottomsheet component automatically receives the following additional props:

  • closeSelf: A function to close the sheet from within the component.
  • syncScrollEvent: A function to attach to a ScrollView (if present within the sheet component) to detect swipe-down gestures.

Usage

Here’s an example of how to use react-native-bottomsheet-navigation in your app:

import BottomsheetNavigation, { BottomsheetWrapper } from "react-native-bottomsheet-navigation";
import { useRef, useCallback } from "react";
import {
  SafeAreaView,
  StatusBar,
  ScrollView,
  Text,
  Button,
  StyleSheet,
  View,
  useColorScheme
} from "react-native";
import { GestureHandlerRootView } from 'react-native-gesture-handler';

// Component to be displayed as a bottomsheet
function CustomSheet({ sheetParams, closeSelf, syncScrollEvent }) {
  const title = sheetParams?.title;
  const subTitle = sheetParams?.subTitle;

  return (
    <View style={styles.sheetContainer}>
      <ScrollView onScroll={syncScrollEvent}>
        <Text style={styles.sectionTitle}>{title}</Text>
        <Text style={styles.sectionDescription}>{subTitle}</Text>
        <Button
          onPress={closeSelf}
          title="Close sheet"
          color="#841584"
        />
      </ScrollView>
    </View>
  );
}

function App() {
  const isDarkMode = useColorScheme() === "dark";
  const sheetHandler = useRef({});
  const backgroundStyle = {
    backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,
    justifyContent: "center",
    flex: 1,
    padding: 32,
  };

  const onBtnPress = useCallback(() => {
    sheetHandler.current = BottomsheetNavigation.pushSheet(CustomSheet, {
      title: "Example",
      subTitle: "Some description...",
    });
  }, []);

  return (
    <GestureHandlerRootView>
      <BottomsheetWrapper>
        <SafeAreaView style={backgroundStyle}>
          <StatusBar
            barStyle={isDarkMode ? "light-content" : "dark-content"}
            backgroundColor={backgroundStyle.backgroundColor}
          />
          <Button
            onPress={onBtnPress}
            title="Open sheet"
            color="#841584"
          />
        </SafeAreaView>
      </BottomsheetWrapper>
    </GestureHandlerRootView>
  );
}

const styles = StyleSheet.create({
  sheetContainer: {
    padding: 24,
    backgroundColor: "white",
  },
  sectionTitle: {
    fontSize: 24,
    fontWeight: "600",
    color: "black",
  },
  sectionDescription: {
    marginTop: 8,
    fontSize: 18,
    fontWeight: "400",
    color: "black",
    marginBottom: 32,
  },
});

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

--