Use this package instead of the broken and unmaintained react-native-modalfy.
This is a maintained fork of colorfy-software/react-native-modalfy, published as:
@spykesocial/react-native-modalfy
Upstream Modalfy is broken on React Native 0.85+.
In RN 0.85, StyleSheet.absoluteFillObject was removed. Upstream Modalfy still spreads that value when building its overlay styles. The result is broken modal layout — content drops into normal document flow and often ends up under the tab bar or otherwise mispositioned.
Upstream issue: colorfy-software/react-native-modalfy#203
All StyleSheet.absoluteFillObject usages were replaced with StyleSheet.absoluteFill.
That restores correct absolute overlay positioning on current React Native / Expo apps.
Credit for the original RN 0.85+ fix approach: fobos531/react-native-modalfy.
yarn add @spykesocial/react-native-modalfy
# or
npm install @spykesocial/react-native-modalfyyarn remove react-native-modalfy
yarn add @spykesocial/react-native-modalfyUpdate imports:
// before
import { ModalProvider, createModalStack, useModal } from "react-native-modalfy";
// after
import {
ModalProvider,
createModalStack,
useModal,
} from "@spykesocial/react-native-modalfy";Optional yarn alias if you want to keep the old import path:
{
"dependencies": {
"react-native-modalfy": "npm:@spykesocial/react-native-modalfy@4.0.1"
}
}Same API as upstream Modalfy.
import { ModalProvider, createModalStack } from "@spykesocial/react-native-modalfy";
const stack = createModalStack(modalConfig, defaultOptions);
export default function App() {
return (
<ModalProvider stack={stack}>
{/* your app */}
</ModalProvider>
);
}Docs / guides: colorfy-software.gitbook.io/react-native-modalfy
MIT — same as upstream react-native-modalfy.