Skip to content
Get started
Menu
Get started

Typography

Choose a PaymentType role for each text element. Roles inherit the host font and keep hierarchy consistent across components.

PaymentType.of(context) exposes nine roles. Every role inherits the host font from textTheme.bodyMedium; the kit bundles no fonts. Values below show size, line, weight and tracking.

The text is… Role
The one display amount display
An action-bar total or a balance amountLarge
A sheet or dialog title title
A section or status title, or a button heading
A paragraph bodyFor(context)
A row label or value label
A supporting line caption
A short status tag
A field entry input

The specimens below use the exported size, line height, weight and tracking in CSS pixels. They inherit the docs font; a Flutter host supplies its own font.

displayPayment received · 1,234.56
amountLargePayment received · 1,234.56
titlePayment received · 1,234.56
headingPayment received · 1,234.56
bodyPayment received · 1,234.56
labelPayment received · 1,234.56
captionPayment received · 1,234.56
tagPayment received · 1,234.56
inputPayment received · 1,234.56
TokenValueUseDon't
display32 / 36 · weight 600 · tracking -0.32One display amount per screen.Never two on one screen.
amountLarge20 / 28 · weight 600 · tracking 0Action-bar total, balance, VA number, entered amount.Not row amounts.
title17 / 24 · weight 600 · tracking 0Sheet, dialog and app-bar title.Not section titles.
heading15 / 20 · weight 600 · tracking 0Section and status titles, Total row, buttons.Not paragraphs.
body15 / 22 · weight 400 · tracking 0Paragraphs; bodyFor tightens leading above 1.5×.Not single-line rows.
label15 / 20 · weight 400 · tracking 0Row labels, values, tabs and row amounts.Not paragraphs.
caption13 / 18 · weight 400 · tracking 0Supporting lines, helper text, meta, legends.Not essential action instructions.
tag12 / 16 · weight 600 · tracking 0Badge or copy feedback, at most three words.Not more than three words.
input16 / 24 · weight 400 · tracking 0Text inside fields.Not field labels.

Use type.tabular(style) for changing or aligned numbers. Use type.reference(style) for VA numbers, transaction IDs and promo codes: it adds tabular figures in the host reference font (Menlo, monospace, Courier fallback). PaymentType has no weight modifier; choose heading instead of label for hierarchy. Hosts may set amountWeight, amountFontFamily and referenceFontFamily.

Do: PaymentType.of(context).caption, as the existing rows do. Don’t: TextStyle(fontSize: 13), which loses host font and semantic intent.

final type = PaymentType.of(context);
final rowAmount = type.tabular(type.label);
final reference = type.reference(type.label);
SizedBox(
height: PaymentType.firstLineHeight(context),
child: const Center(child: Icon(PaymentIcons.info)),
);

Above 1.5×, rows wrap values and bodyFor uses 1.3 leading. At 200%, titles still wrap. Amounts at 20 and above and adjacent medium icons clamp at 1.6×; amounts scale down rather than hide digits. Use sentence case, specific copy and put key words first. Never truncate an action label.

Stripe font PaymentTextRole
title title
subtitle, heading, subheading heading
lead, body body
bodyEmphasized body + semibold
caption caption
kicker tag

PaymentFontWeight provides regular (400), semibold (600) and bold (700) emphasis for PaymentInline and PaymentSpan. Use bold for emphasis within running text; choose a type role for headings.

theme.amountStyle(context) remains the display alias. The deprecated large parameter becomes type.tabular(type.label) for row amounts; choose type.tabular(type.heading) only when preserving the old 600 weight is required.

PaymentType

class PaymentType · lib/src/foundation/payment_type.dart

Public type foundation: nine closed roles, seven sizes and two weights. Every role inherits the host font. Choose a role for hierarchy; there is no weight modifier. Use tabular for numbers and reference for IDs.

MemberType / valueDescription
isLargeboolWhether text is scaled above 1.5×, where rows wrap and paragraphs tighten their leading.
firstLineHeightdoubleHeight of one 15/20 heading or label line at the current text scale. Center leading icons in a box this tall when text wraps.
tabularTextStylestyle with tabular figures.
referenceTextStylestyle with tabular figures in PaymentTheme.referenceFontFamily.
displayTextStyleThe one display amount per screen: 32/36, tracking −0.32.
amountLargeTextStyleAction-bar total, balance, VA number, entered amount: 20/28.
titleTextStyleSheet, dialog and app-bar titles: 17/24 w600.
headingTextStyleSection and status titles, the Total row, buttons: 15/20 w600.
bodyTextStyleParagraphs: 15/22. Use bodyFor so leading tightens at large text.
labelTextStyleSingle-line row text, labels and values: 15/20.
captionTextStyleSupporting lines under a title: 13/18, muted.
tagTextStyleBadges and tags: 12/16 w600. No color; the tone sets it.
inputTextStyleText fields: 16/24.
bodyForTextStylebody, with 1.3 leading above 1.5× text so long paragraphs stay short.

PaymentType.of(…) — Resolves the nine roles from the ambient host font and payment theme.

ParameterTypeDefaultDescription
contextrequiredpositionalBuildContext——

PaymentTextRole

enum PaymentTextRole · lib/src/foundation/payment_tokens.dart

The nine PaymentType roles; no additional role exists.

ValueDescription
displaydisplay: one display amount.
amountLargeamountLarge: totals and balances.
titletitle: sheet and app-bar titles.
headingheading: section titles.
bodybodyFor(context): paragraphs.
labellabel: row labels and values.
captioncaption: supporting text.
tagtag: short status words.
inputinput: field text.

PaymentFontWeight

enum PaymentFontWeight · lib/src/foundation/payment_tokens.dart

Running-text emphasis only; choose a PaymentType role for hierarchy.

ValueDescription
regularFontWeight.w400.
semiboldFontWeight.w600.
boldFontWeight.w700; emphasis inside running text only.

PaymentInline and PaymentSpan apply the closed role and emphasis vocabulary to running text.