API

createTransitionAwareComponent

Wrap custom components so they can receive styleId styles and scroll metadata handling.

createTransitionAwareComponent() wraps a component so it can receive styleId styles and participate in transition measurement.

TSX

1import Transition from "react-native-screen-transitions";
2
3const TransitionBlurView = Transition.createTransitionAwareComponent(BlurView, {
4 alreadyAnimated: false,
5});
6
7<TransitionBlurView styleId="blur" intensity={40} />;

Options:

OptionMeaning
alreadyAnimatedSet true when the wrapped component is already animated
isScrollableSet true for custom scrollables that should coordinate gestures and publish layouts.scroll metadata

When isScrollable is true, the wrapper composes the scroll handler used by the gesture system. Keep passing your own onScroll, onLayout, and onContentSizeChange; the wrapper composes them with its internal handlers.