Skip to main content

AnimatedCard props

Size and Shape​

propTypeDefaultDescription
widthnumberwindow.width * widthRatioCard width
heightnumberwidth / aspectRatioCard height
widthRationumber0.8Screen-width multiplier used when width is not provided
orientationCardOrientationHorizontalHorizontal or vertical ratio
aspectRationumberOrientation defaultCustom image ratio
radiusnumber20Card corner radius

Lighting and Image​

propTypeDefaultDescription
frontImageSourceImageSourcePropTypeNoneFront artwork
imageFitImageFitCoverImage resize mode
lightingTypeLightingTypeNormalLighting style
showTexturebooleanfalseShows Skia turbulence texture

Motion and Flip​

propTypeDefaultDescription
maxTiltDegnumber20Maximum tilt angle
perspectivenumber10003D transform perspective
sensorEnabledbooleanfalseUses DeviceMotion sensor input
sensorUpdateIntervalnumber16Sensor update interval in milliseconds
enableTapToFlipbooleantrueEnables left/right tap-zone flip
enableSwipeToFlipbooleantrueEnables horizontal swipe flip
tapZoneRationumber0.2Width ratio for each side tap zone
flipDurationnumber700Flip animation duration in milliseconds
flipSwipeVelocitynumber600Minimum velocity for swipe flip
onFlip(direction, nextFlipDegrees) => voidNoneCalled with the flip direction and target degrees

Spring Options​

propTypeDefaultDescription
springConfigWithSpringConfigSPRING_CONFIGTilt spring used while dragging or reading sensor input
resetSpringConfigWithSpringConfigRESET_SPRING_CONFIGSpring used to reset tilt to neutral
liftSpringConfigWithSpringConfigLIFT_SPRING_CONFIGSpring used when the card lifts on gesture begin
releaseLiftSpringConfigWithSpringConfigRELEASE_LIFT_SPRING_CONFIGSpring used when the lifted card settles

Rendering and Styles​

propTypeDescription
frontComponentReactNode | AnimatedCardFaceRendererFront overlay or full front renderer
backComponentReactNode | AnimatedCardFaceRendererCustom back renderer
styleStyleProp<ViewStyle>Card wrapper style
cardStyleStyleProp<ViewStyle>Flip-motion wrapper style
faceStyleStyleProp<ViewStyle>Front/back face Animated.View style
faceClipStyleStyleProp<ViewStyle>Inner clipped face style
accessibilityLabelstringCard accessibility label