Motion.View
Animatable View. The default primitive — use it for boxes, surfaces, and anything that doesn't need to be Text / Image / scrolling / pressable.
import { Motion } from '@onlynative/inertia'
export function Card() {
return (
<Motion.View
initial={{ opacity: 0, translateY: 24 }}
animate={{ opacity: 1, translateY: 0 }}
transition={{ type: 'spring', tension: 200, friction: 18 }}
style={cardStyles.card}
/>
)
}
Tree-shaken import
import { MotionView } from '@onlynative/inertia/view'
Animatable keys
opacity, translateX, translateY, scale, scaleX, scaleY, rotate, rotateX, rotateY, width, height, borderRadius, backgroundColor, borderColor.
Notes
transformis composed automatically. Mixing transform keys (e.g.translateX+scale) into oneanimateobject emits a singletransformarray — you don't writetransform: [...]yourself.rotate,rotateX, androtateYare numbers, in degrees. The factory wraps each as{ rotate: '${value}deg' }(etc.) for Reanimated. UserotateX/rotateYtogether with aperspectivestyle entry to get the 3D effect to render.width/heightinterpolation can jitter on Fabric for non-flex: 1containers. PreferscaleX/scaleYfor resize animations where layout impact is acceptable.