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

native-modal-bottomsheet

v1.0.3

Published

Bottom sheet component for React Native

Readme

native-modal-bottomsheet

A beautiful and customizable bottom sheet component for React Native, built on top of @gorhom/bottom-sheet.

Features

Easy to use - Simple API with sensible defaults
🎨 Customizable - Theme support with light/dark mode
📏 Flexible heights - Predefined sizes from small to full screen
📜 Scrollable content - Built-in scroll support for long content
Performant - Powered by Reanimated 2 & Gesture Handler

Installation

npm install native-modal-bottomsheet

Peer Dependencies

This package requires the following peer dependencies:

npm install @gorhom/bottom-sheet react-native-gesture-handler react-native-reanimated

Setup

Configure React Native Reanimated in your babel.config.js:

module.exports = {
  presets: ['module:metro-react-native-babel-preset'],
  plugins: ['react-native-reanimated/plugin'], // Add this line
};

For iOS, run:

cd ios && pod install

Usage

Basic Example

import React, { useState } from 'react';
import { View, Text, Button } from 'react-native';
import { BottomSheetComponent } from 'native-modal-bottomsheet';

const App = () => {
  const [visible, setVisible] = useState(false);

  return (
    <View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
      <Button title="Open Bottom Sheet" onPress={() => setVisible(true)} />

      <BottomSheetComponent
        visible={visible}
        onClose={() => setVisible(false)}
      >
        <Text>Hello from Bottom Sheet!</Text>
      </BottomSheetComponent>
    </View>
  );
};

export default App;

With Title

<BottomSheetComponent
  visible={visible}
  onClose={() => setVisible(false)}
  title="Select an Option"
>
  <Text>Your content here</Text>
</BottomSheetComponent>

Custom Height

<BottomSheetComponent
  visible={visible}
  onClose={() => setVisible(false)}
  height="large" // 'small' | 'medium' | 'large' | 'xlarge' | 'full'
>
  <Text>Larger bottom sheet</Text>
</BottomSheetComponent>

Scrollable Content

<BottomSheetComponent
  visible={visible}
  onClose={() => setVisible(false)}
  scrollable={true}
>
  {/* Long list of items */}
  {items.map((item) => (
    <Text key={item.id}>{item.name}</Text>
  ))}
</BottomSheetComponent>

Dark Mode

<BottomSheetComponent
  visible={visible}
  onClose={() => setVisible(false)}
  isDark={true}
>
  <Text style={{ color: '#fff' }}>Dark mode content</Text>
</BottomSheetComponent>

Custom Theme

<BottomSheetComponent
  visible={visible}
  onClose={() => setVisible(false)}
  isDark={false}
  theme={{
    backgroundLight: '#f5f5f5',
    backgroundDark: '#2c2c2e',
    textLight: '#333',
    textDark: '#f0f0f0',
    handleLight: '#999',
    handleDark: '#666',
  }}
>
  <Text>Themed content</Text>
</BottomSheetComponent>

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | children | ReactNode | Required | Content to display inside the bottom sheet | | visible | boolean | Required | Controls visibility of the bottom sheet | | onClose | () => void | Required | Callback when bottom sheet is closed | | height | 'small' \| 'medium' \| 'large' \| 'xlarge' \| 'full' | 'medium' | Preset height of the bottom sheet | | scrollable | boolean | false | Enable scrolling for content | | title | string | undefined | Optional title displayed at the top | | isDark | boolean | false | Enable dark mode styling | | theme | object | {} | Custom theme colors (see below) |

Height Options

  • small: 30% of screen height
  • medium: 50% of screen height (single snap point)
  • large: 50% → 75% (expandable)
  • xlarge: 60% → 90% (expandable)
  • full: 50% → 95% (expandable)

Theme Object

{
  backgroundLight?: string;  // Background color in light mode
  backgroundDark?: string;   // Background color in dark mode
  textLight?: string;        // Text color in light mode
  textDark?: string;         // Text color in dark mode
  handleLight?: string;      // Handle indicator color in light mode
  handleDark?: string;       // Handle indicator color in dark mode
}

Complete Example

import React, { useState } from 'react';
import { View, Text, Button, StyleSheet } from 'react-native';
import { BottomSheetComponent } from 'native-modal-bottomsheet';

const App = () => {
  const [visible, setVisible] = useState(false);

  return (
    <View style={styles.container}>
      <Button title="Show Options" onPress={() => setVisible(true)} />

      <BottomSheetComponent
        visible={visible}
        onClose={() => setVisible(false)}
        title="Choose an Action"
        height="large"
        scrollable={true}
        isDark={false}
      >
        <View style={styles.option}>
          <Text style={styles.optionText}>Option 1</Text>
        </View>
        <View style={styles.option}>
          <Text style={styles.optionText}>Option 2</Text>
        </View>
        <View style={styles.option}>
          <Text style={styles.optionText}>Option 3</Text>
        </View>
      </BottomSheetComponent>
    </View>
  );
};

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#fff',
  },
  option: {
    padding: 20,
    borderBottomWidth: 1,
    borderBottomColor: '#eee',
  },
  optionText: {
    fontSize: 16,
  },
});

export default App;

Requirements

  • React Native >= 0.73.0
  • React >= 18.0.0
  • @gorhom/bottom-sheet >= 4.6.4
  • react-native-gesture-handler >= 2.14.0
  • react-native-reanimated >= 3.0.0

License

ISC

Credits

Built with @gorhom/bottom-sheet