Interface SlideAnimationConfig

Source
Expand description

Configuration for slide animation.

interface SlideAnimationConfig {
    backdropAnimatedStyle?: ModalAnimatedStyleFunction;
    contentAnimatedStyle?: ModalAnimatedStyleFunction;
    direction?:
        | SwipeDirection
        | { end: SwipeDirection | SwipeDirection[]; start: SwipeDirection };
    duration?: number;
    type: "slide";
}

Properties§

Source§

backdropAnimatedStyle?: ModalAnimatedStyleFunction

Optional custom worklet function for backdrop animation styles. If provided, merges with the default backdrop fade.

Source§

contentAnimatedStyle?: ModalAnimatedStyleFunction

Optional custom worklet function for content animation styles. If provided, merges with the default animation for this type. Receives progress (0-1), offsetX, offsetY, and screen dimensions.

Source§

direction?:
    | SwipeDirection
    | { end: SwipeDirection | SwipeDirection[]; start: SwipeDirection }

Direction for slide animation. Can be a single direction or an object with start/end directions.

default
'down'
Source§

duration?: number

Duration of the animation in milliseconds.

default
300
Source§

type: "slide"