React Native · Components
Image
An image that manages its loading, error and placeholder states itself (same API as Image on web).
5 exports
Live example
The preview runs in the browser with the web component; the native component takes the same props and looks the same on iOS and Android.
Preview

Code
Events
- Events appear here when you interact with the preview.
An image filling the box in a card (fill) and a custom error view

Aegean cove
Custom error view
Import
Image
componentAn image that manages its loading, error and placeholder states itself (same API as Image on web). Gallery thumbnails are drawn with it too.
- While loading: a shimmering skeleton, the image's dominant color or a small blurred image (
placeholder); it fades in smoothly on load (native driver). - No layout shift: with
width+height,ratioorfillthe box reserves space before the image loads. - Error: an icon and "Retry"; it retries by itself when the app returns to the foreground.
Examples
ImageFit
typeHow the image fits the box (the same names as object-fit on web).
ImageSource
typeImage source: an address or a file in the bundle (require("./cover.png")).
ImageLoadInfo
interfaceOriginal dimensions of the loaded image.
| Name | Type | Description |
|---|---|---|
width | number | Original width (pixels). |
height | number | Original height (pixels). |
ImageProps
interfaceProps of Image.
| Name | Type | Default | Description |
|---|---|---|---|
src | ImageSource | Image address or a file in the bundle (require(...)). | |
alt | string | Alternative text (screen readers). Give "" for a decorative image. | |
width? | number | Original width. Given together with height, the box reserves space in the right ratio before the image loads; it shrinks if it does not fit the container. | |
height? | number | Original height. See width. | |
ratio? | number | Box ratio (width / height, e.g. 16 / 9). When given the box is full width. | |
fill? | boolean | false | Fill the container completely (background in a positioned container, card cover, gallery). |
fit? | ImageFit | "cover" | How the image fits the box. |
placeholder? | string | "shimmer" | Shown until it loads: a color ("#8a9bb0", the image's dominant color), a small blurred image (an address or a data: address), "shimmer" a shimmering skeleton, or "none". |
appear? | "fade" | "scale" | "none" | "fade" | Reveal on load: "fade", "scale" (growing slightly) or "none". |
fallback? | ReactNode | ((retry: () => void) => ReactNode) | Content shown if it fails to load. If omitted an icon, "Image could not be loaded" and "Retry" appear. A function receives the retry function. null shows nothing. It retries by itself when the app returns to the foreground. | |
priority? | boolean | false | The first visible image (cover, product image): download starts before it renders. Limit it to one or two images per screen. |
headers? | Record<string, string> | Request headers (e.g. Authorization for protected images). | |
onLoad? | (info: ImageLoadInfo) => void | On load; with the image's original dimensions. | |
onError? | () => void | When it fails to load. | |
style? | StyleProp<ViewStyle> | Style of the box (corners, border, size). Corners clip the image too. | |
imageStyle? | StyleProp<ImageStyle> | Style of the image itself. | |
effect? | EffectProp | Effect or effects of the image box (e.g. "shine", ["tilt", "glow"]). Defaults to UIProvider appearance.defaults.image.effect. | |
ref? | Ref<ViewRef> | Access to the box. | |
testID? | string | Test id. |