Skip to main content

Image

Display a bundled image or a local image URI.

Image in a native Kindle example

Usage​

Save this example as apps/Reader/App.js in the starter app.

import React from 'react';
import {Image, View} from 'react-kindle';

export default function App() {
return (
<View style={{padding: 24}}>
<Image source="file:///mnt/us/extensions/Reader/res/cover.png"
style={{width: 160, height: 200}} />
</View>
);
}

Props​

PropType / defaultDescription
sourceURI string, source object, or bundled assetRequired image source.
resizeModestring = containImage fitting mode.
colorSchemelight (default) / darkExplicit image color scheme.
invertInDarkModeboolean = trueInvert when colorScheme is dark.
styleView styleSet width and height.

Put an image at apps/Reader/res/cover.png before building this example. Deployment copies it to the path shown above. For a bundled asset, use source={require("./cover.png")}. The screenshot uses a book icon.