Skip to main content

Media

AppImage​

Image with className support, contentFit mapping and a source that accepts either a number (require) or a uri object.

npx midestic-rn-library add app-image
<AppImage source={require("./avatar.png")} className="h-[64px] w-[64px] rounded-[32px]" contentFit="cover" />

<AppImage
source={{ uri: "https://picsum.photos/240/240" }}
className="h-[160px] w-[160px] rounded-[16px]"
contentFit="cover"
/>
PropTypeDefaultDescription
sourceImageProps["source"] | number-Local require or remote uri
contentFitcover | contain | fill | none | scale-downcontainMaps to resizeMode
classNamestring""Size, radius, ...
...restImageProps-Everything else (onError, testID, ...)