Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md

react-native-multiple-modals

NPM Version NPM Downloads Static Badge Static Badge nightly

Native layering for React Native modals, sheets and overlays, including native Modal and bottom tabs

React Native Multiple Modals

✨ Features

  • 🚀 Shows multiple instances at the same time
  • 💯 Displays on top of default modal
  • 🆗 Supports gesture handler out of the box
  • 🛠️ Displays above bottom tabs navigation
  • 📱 Adjusts content when rotated
  • 💥 Enhanced status bar configuration
  • ✅ Built with Accessibility support in mind (WCAG)

Documentation: https://paufau.github.io/react-native-multiple-modals/

Installation

npm i react-native-multiple-modals
yarn add react-native-multiple-modals

iOS

pod install --project-directory=ios

Usage

import { ModalView } from "react-native-multiple-modals";

const YourComponent = () => {
  const [isVisible, setVisibility] = useState(false);

  return (
    <View>
      <Button text="Open modal" onPress={() => setVisibility(true)} />
      {isVisible && (
        <ModalView
          animationType="fade"
          statusBar={{ translucent: true, barStyle: "dark-content" }}
          backdropColor="rgba(0,0,0,0.5)"
          contentContainerStyle={{
            justifyContent: "center",
            alignItems: "center",
          }}
          onRequestDismiss={() => setVisibility(false)}
        >
          <YourContentView />
        </ModalView>
      )}
    </View>
  );
};

More examples: example/demo-components/src/modals

Comparison

Native or JSMultiple at onceAccessibility
react-native-multiple-modalsNative✅✅
Modal (React Native)Native❌ on iOS✅
react-native-modalNative❌✅
react-native-modalfyJS✅❌
@react-navigation/native-stackNative✅❌
@gorhom/portal, react-native-portalizeJS✅❌

Contribution

FOUND A BUG? HELP THE PROJECT AND REPORT IT!

If you notice any bugs or anything working differently compared to React Native, feel free to open an issue. It’ll really help improve the project 🙏.

Still missing something?

I would love if you would let me know what you are missing in the library. Together we can make it a community standard!

Sponsor & Support

If you found the library useful, you can support me here:

Buy Me a Coffee at ko-fi.com

关于 About

Native implementation with the ability to display multiple Modals
androiddialogexpofabriciosmodalmodalsmultiplenew-architecturereactreact-nativesimultaneouslyweb

语言 Languages

TypeScript45.9%
Kotlin17.3%
Objective-C12.6%
JavaScript9.1%
C++4.5%
MDX3.2%
Objective-C++2.6%
CSS1.9%
CMake1.5%
Ruby0.9%
Shell0.5%

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
41
Total Commits
峰值: 19次/周
Less
More

核心贡献者 Contributors