Mobile › Display

Text

Text on the platform's own type scale, from largeTitle to caption. Font scaling stays on.

Installation

npx expo install plankui-mobile react-native-safe-area-context expo-haptics

Usage

import { Text } from "plankui-mobile";

<Text variant="largeTitle">Trips</Text>
<Text variant="headline">Lisbon</Text>
<Text tone="muted" variant="subhead">4 days · 7 places</Text>

iOS and Android

iOS: San Francisco sizes: body 17 pt, large title 34 pt bold.

Android: Material 3 sizes: body 16 sp, titles in regular weight.

API reference

PropTypeDefaultDescription
variant"largeTitle" | "title" | "title2" | "headline" | "body" | "callout" | "subhead" | "footnote" | "caption""body"Size on the platform's scale.
tone"ink" | "ink2" | "muted" | "accent" | "danger" | "onAccent""ink"Colour from the theme.
weight"400" | "500" | "600" | "700"variant's ownOverride the weight.
centerbooleanfalseCentre the text.
...TextPropsTextProps–Any React Native Text prop.