Skip to main content

Typography

The typography system provides consistent text styling across your application.

Text Categories​

CategoryUsageDefault Size
displayBrand name, logo text, decorative headers24px
headingPage titles, section headers20px
subheadingCard headers, secondary titles18px
titleList items, button labels, navigation16px
bodyContent text, paragraphs, descriptions14px
captionHelper text, timestamps, footnotes12px

Font Weights​

Each category has three weight variants:

WeightUsage
regularBody text, descriptions, general content
mediumEmphasized text, labels, navigation items
boldHeadings, buttons, important labels

Available Fonts​

FontBest forLocale variants
DancingScriptDecorative script, brandingen
OpenSansUI text, body contenten
NotoSansMultilingual UI text — automatically uses Myanmar or Thai glyph sets when the active locale is my or then, my, th

Usage​

With Typography​

import { Typography } from '@multinaire/expo-ui';

// Using type and weight props
<Typography type="heading" weight="bold">
Page Title
</Typography>

<Typography type="body">
Regular body text
</Typography>

<Typography type="caption" color="neutralVariant">
Helper text
</Typography>

Direct Access​

const { fonts } = useTheme();

<Text style={fonts.heading.bold}>
Page Title
</Text>

<Text style={[fonts.body.regular, { color: colors.onBackground }]}>
Body text
</Text>

Configuration​

Define typography in your theme.json:

{
"texts": {
"display": {
"regular": { "fontFamily": "DancingScript", "fontSize": 24 },
"medium": { "fontFamily": "DancingScript", "fontSize": 24 },
"bold": { "fontFamily": "DancingScript", "fontSize": 24 }
},
"heading": {
"regular": { "fontFamily": "NotoSans", "fontSize": 20 },
"medium": { "fontFamily": "NotoSans", "fontSize": 20 },
"bold": { "fontFamily": "NotoSans", "fontSize": 20 }
},
"body": {
"regular": { "fontFamily": "NotoSans", "fontSize": 14 },
"medium": { "fontFamily": "NotoSans", "fontSize": 14 },
"bold": { "fontFamily": "NotoSans", "fontSize": 14 }
}
}
}

Typography Scale Recommendations​

CategoryMinDefaultMax
caption10px12px13px
body13px14px16px
title14px16px18px
subheading16px18px20px
heading18px20px24px
display20px24px32px

Responsive Typography​

The typography values are fixed, but you can adjust which type to use based on screen size:

const { isMobile } = useResponsiveDesign();

<Typography type={isMobile ? 'title' : 'heading'} weight="bold">
{title}
</Typography>