Project React Native Reanimated Modal
Type Aliases§
Source§type Modal Animated Style Function = { ... }
type Modal Animated Style Function = { ... }
Source§type Modal Animation = "fade" | "slide" | "scale" | "custom"
type Modal Animation = "fade" | "slide" | "scale" | "custom"
Source§type Modal Animation Config<T> = T extends "fade"
? FadeAnimationConfig
: T extends "slide"
? SlideAnimationConfig
: T extends "scale"
? ScaleAnimationConfig
: T extends "custom" ? CustomAnimationConfig : never
type Modal Animation Config<T> = T extends "fade"
? FadeAnimationConfig
: T extends "slide"
? SlideAnimationConfig
: T extends "scale"
? ScaleAnimationConfig
: T extends "custom" ? CustomAnimationConfig : never
Source§type Modal Animation Config Union =
| FadeAnimationConfig
| SlideAnimationConfig
| ScaleAnimationConfig
| CustomAnimationConfig
type Modal Animation Config Union =
| FadeAnimationConfig
| SlideAnimationConfig
| ScaleAnimationConfig
| CustomAnimationConfig
Union of all animation configuration types.
Source§type Modal Animation State = "opening" | "sliding" | "bouncing" | "closing"
type Modal Animation State = "opening" | "sliding" | "bouncing" | "closing"
Source§type Swipe Direction = "up" | "down" | "left" | "right"
type Swipe Direction = "up" | "down" | "left" | "right"
Variables§
Source§const DEFAULT _ MODAL _ ANIMATION _ CONFIGS: { ... }...
const DEFAULT _ MODAL _ ANIMATION _ CONFIGS: { ... }...
Default animation configurations.
Source§const DEFAULT _ MODAL _ ANIMATION _ DURATION: 300300
const DEFAULT _ MODAL _ ANIMATION _ DURATION: 300300
Default values and configurations.
Source§const DEFAULT _ MODAL _ BACKDROP _ CONFIG: ModalBackdropConfig...
const DEFAULT _ MODAL _ BACKDROP _ CONFIG: ModalBackdropConfig...
Default backdrop configuration.
Source§const DEFAULT _ MODAL _ BOUNCE _ OPACITY _ THRESHOLD: 0.050.05
const DEFAULT _ MODAL _ BOUNCE _ OPACITY _ THRESHOLD: 0.050.05
Source§const DEFAULT _ MODAL _ BOUNCE _ SPRING _ CONFIG: SpringConfig...
const DEFAULT _ MODAL _ BOUNCE _ SPRING _ CONFIG: SpringConfig...
Source§const DEFAULT _ MODAL _ SCALE _ FACTOR: 0.80.8
const DEFAULT _ MODAL _ SCALE _ FACTOR: 0.80.8
Source§const DEFAULT _ MODAL _ SWIPE _ CONFIG: ModalSwipeConfig...
const DEFAULT _ MODAL _ SWIPE _ CONFIG: ModalSwipeConfig...
Default swipe configuration.
Source§const DEFAULT _ MODAL _ SWIPE _ DIRECTION: SwipeDirection'down'
const DEFAULT _ MODAL _ SWIPE _ DIRECTION: SwipeDirection'down'
Source§const DEFAULT _ MODAL _ SWIPE _ THRESHOLD: 100100
const DEFAULT _ MODAL _ SWIPE _ THRESHOLD: 100100
Source§const Modal: FC<ModalProps>...
const Modal: FC<ModalProps>...
Modal component with smooth, customizable animations and gesture support. Built on top of React Native's Modal, Reanimated, and Gesture Handler.
Functions§
Source§getSlideInDirection(
animationConfig: ModalAnimationConfigUnion,
fallback?: SwipeDirection,
): SwipeDirection
getSlideInDirection(
animationConfig: ModalAnimationConfigUnion,
fallback?: SwipeDirection,
): SwipeDirection
Gets the slide-in direction from animation config.
Source§getSwipeDirections(
swipeConfig: ModalSwipeConfig,
animationConfig?: ModalAnimationConfigUnion,
fallback?: SwipeDirection | SwipeDirection[],
): SwipeDirection[]
getSwipeDirections(
swipeConfig: ModalSwipeConfig,
animationConfig?: ModalAnimationConfigUnion,
fallback?: SwipeDirection | SwipeDirection[],
): SwipeDirection[]
Extracts swipe directions from swipe config or animation config fallback.
Source§normalizeAnimationConfig(
config?: ModalAnimation | Partial<ModalAnimationConfigUnion> | undefined,
): ModalAnimationConfigUnion
normalizeAnimationConfig(
config?: ModalAnimation | Partial<ModalAnimationConfigUnion> | undefined,
): ModalAnimationConfigUnion
Normalizes animation configuration by providing defaults for missing properties.
Source§normalizeBackdropConfig(
backdrop?: ModalBackdropConfig | ReactNode,
): {
config: ModalBackdropConfig;
customRenderer?: ReactNode;
enabled: boolean;
isCustom: boolean;
}
normalizeBackdropConfig(
backdrop?: ModalBackdropConfig | ReactNode,
): {
config: ModalBackdropConfig;
customRenderer?: ReactNode;
enabled: boolean;
isCustom: boolean;
}
Normalizes backdrop configuration by providing defaults for missing properties.
Source§normalizeSwipeConfig(config?: false | ModalSwipeConfig): ModalSwipeConfig
normalizeSwipeConfig(config?: false | ModalSwipeConfig): ModalSwipeConfig
Normalizes swipe configuration by providing defaults for missing properties.
Interfaces§
- CustomAnimationConfig
Configuration for custom animation.
- FadeAnimationConfig
Configuration for fade animation.
- ModalBackdropConfig
Configuration for modal backdrop.
- ModalProps
Props for the Modal component.
- ModalSwipeConfig
Configuration for modal swipe.
- ScaleAnimationConfig
Configuration for scale animation.
- SlideAnimationConfig
Configuration for slide animation.
Generic type for animation config based on animation type.