API

createBoundaryComponent

Wrap custom components with the boundary system.

createBoundaryComponent() wraps a custom component with the boundary system.

TSX

1import Transition from "react-native-screen-transitions";
2
3const BoundaryImage = Transition.createBoundaryComponent(Image, {
4 alreadyAnimated: false,
5});
6
7<BoundaryImage id="avatar" source={avatar} style={styles.avatar} />

The wrapped component keeps its original props and accepts boundary props such as id, group, anchor, scaleMode, target, method, enabled, handoff, and escapeClipping.

Use this when a custom component should behave like Transition.Boundary without adding an extra wrapper view around it.