Expand description
interface ModalProps {
animationConfig?: ModalAnimation | ModalAnimationConfigUnion;
backdropColor?: string;
backdropOpacity?: number;
backdropTestID?: string;
children: ReactNode;
closable?: boolean;
containerTestID?: string;
contentContainerStyle?: StyleProp<ViewStyle>;
contentTestID?: string;
coverScreen?: boolean;
hardwareAccelerated?: boolean;
hasBackdrop?: boolean;
navigationBarTranslucent?: boolean;
onBackdropPress?: () => void;
onHide?: () => void;
onOrientationChange?: (event: NativeSyntheticEvent<any>) => void;
onShow?: () => void;
renderBackdrop?: () => ReactNode;
statusBarTranslucent?: boolean;
style?: StyleProp<ViewStyle>;
supportedOrientations?: (
| "portrait"
| "portrait-upside-down"
| "landscape"
| "landscape-left"
| "landscape-right"
)[];
swipeConfig?: SwipeConfig;
visible: boolean;
}
Properties§
Source§animation Config?: ModalAnimation | ModalAnimationConfigUnion
animation Config?: ModalAnimation | ModalAnimationConfigUnion
Animation configuration for modal appearance. Can be a simple animation type string or a detailed config object.
Source§closable?: boolean
closable?: boolean
Whether the modal can be closed by user actions (backdrop press, swipe, hardware back).
§hardware Accelerated?: boolean
hardware Accelerated?: boolean
Controls whether to force hardware acceleration for the underlying window.
Determines whether your modal should go under the system navigationbar.
§on Orientation Change?: (event: NativeSyntheticEvent<any>) => void
on Orientation Change?: (event: NativeSyntheticEvent<any>) => void
The onOrientationChange
callback is called when the orientation changes while the modal is being displayed.
The orientation provided is only 'portrait' or 'landscape'. This callback is also called on initial render, regardless of the current orientation.
Source§render Backdrop?: () => ReactNode
render Backdrop?: () => ReactNode
Custom backdrop renderer. Если задан, используется вместо стандартного backdrop. Полезно для BlurView, градиентов и других кастомных фонов.
§status Bar Translucent?: boolean
status Bar Translucent?: boolean
Determines whether your modal should go under the system statusbar.
§supported Orientations?: (
| "portrait"
| "portrait-upside-down"
| "landscape"
| "landscape-left"
| "landscape-right"
)[]
supported Orientations?: (
| "portrait"
| "portrait-upside-down"
| "landscape"
| "landscape-left"
| "landscape-right"
)[]
The supportedOrientations
prop allows the modal to be rotated to any of the specified orientations.
On iOS, the modal is still restricted by what's specified in your app's Info.plist's UISupportedInterfaceOrientations field.
Source§swipe Config?: SwipeConfig
swipe Config?: SwipeConfig
Swipe gesture configuration.
Props for the Modal component.