Skip to main content

Text

Display text using Kindle font and size presets.

Text in a native Kindle example

Usage​

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

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

export default function App() {
return (
<View style={{padding: 24}}>
<Text variant="h1">Library</Text>
<Text>Continue where you left off.</Text>
<Text variant="caption">12 books</Text>
</View>
);
}

Props​

PropType / defaultDescription
childrentext / text nodesText content.
variantstring = bodyTypography preset.
sizenumberOverride base font size before scaling.
styleText styleColor, alignment, and other text styles.

Typography presets​

VariantFontSize / line heightWeight
h1Bookerly Display36 / 56Normal
h2Bookerly Display28 / 40Normal
h3Amazon Ember20 / 24Bold
h4Bookerly20 / 24Bold
h5Amazon Ember20 / 24Medium
h6Amazon Ember18 / 24Bold
body1Amazon Ember18 / 24Normal
body2Bookerly18 / 24Normal
smallAmazon Ember16 / 20Normal
titleAmazon Ember20 / 32Bold
bodyAmazon Ember18 / 26Normal
captionAmazon Ember16 / 24Normal

Font sizes follow the current font scale. The title, body, and caption presets also scale line height. Other presets keep the listed line height. Standard React Native text props are passed through.