ActionCardImage
The ActionCardImage is used to add an image (jpg/png), SVG or a lottie to the card's body.
#
Usage
//Import the desired image/svg/lottieimport img from "..."import svg from "..."import lottie from "..."
//Then pass it using the correct prop
//png / jpg<ActionCardImage img={img}/>
//SVG<ActionCardImage SVGImg={svg}/>
//Lottie with default options<ActionCardImage lottie={lottie}/>
// Lottie with lottieOptions<ActionCardImage lottie={lottie} lottieOptions={{ loop: false, speed: 2, /*rest of the options here*/ }}/>
#
PropsName | Type | Default | Description |
---|---|---|---|
img | PNG or JPG file | undefined | Adds a PNG or JPG image |
SVGImg | SVG file | undefined | Adds a SVG image |
lottie | Lottie file | undefined | Adds a Lottie |
lottieOptions | LottieProps | undefined | Object containing the lottie's options. See props here |
Variant | 'default' , 'icon' , 'fullscreen' | 'default' | The image variant. Default is a small fixed image, icon should only be used for icons, and it enables shrinking of the image when scrolling, and fullscreen is a fullscreen image |
scrollDistanceRef | Animated.Value | Ref passed from ActionCardContent | How far the user has scrolled. Used to shrink the image. Avoid passing this manually if possible. |