Skip to main content

ListItem

Show a selectable row with a title, optional subtitle, and trailing content.

ListItem in a native Kindle example

Usage​

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

import React, {useState} from 'react';
import {ListItem, Text, View} from 'react-kindle';

export default function App() {
const [opened, setOpened] = useState(false);

return (
<View style={{padding: 24}}>
<ListItem title="Reading" subtitle="12 books" trailing={<Text>Open</Text>}
onPress={() => setOpened(true)} />
<Text>{opened ? 'Collection selected' : 'Choose a collection'}</Text>
</View>
);
}

Props​

PropType / defaultDescription
title / subtitlestringMain label and supporting text.
iconImage sourceOptional leading image.
trailingReact nodeContent at the end of the row.
onPress() => voidSelection callback.
boldboolean = falseBold title.
disabledboolean = falsePrevents presses.
separatorboolean = trueShow a divider below the row.
styleView styleLayout overrides; minimum height is 56 scaled units.