API reference
API reference
The complete public surface of react-native-magic-modal.
Magic Modal intentionally exports a small surface. Most applications use one component, one global object, one hook, and one result enum.
magicModal
Show, update, and hide modals from anywhere.
useMagicModal
Hide the current modal with typed return data.
MagicModalPortal
The single root component that owns the stack.
Modal configuration
Animation, backdrop, gesture, callback, and style options.
Hide results
The discriminated result union and close reasons.
Imports
Every public value and type is available from the package root:
import {
MagicModalHideReason,
MagicModalPortal,
magicModal,
useMagicModal,
type Direction,
type HideReturn,
type ModalChildren,
type ModalProps,
type NewConfigProps,
} from "react-native-magic-modal";The configuration table is generated directly from the TypeScript source during the docs build. Function pages are curated because generated declarations do not communicate async lifecycle or cancellation semantics well.