Typography Scale Tokens
Material 3 defines a 15-step type scale across five role families — `displayLarge/Medium/Small`, `headlineLarge/Medium/Small`, `titleLarge/Medium/Small`, `bodyLarge/Medium/Small`, `labelLarge/Medium/Small` — exposed as `…
$ prime install @android-compose/rule-typography-scale-tokens Projection
Always in _index.xml · the agent never has to ask for this.
TypographyScaleTokens [rule] v0.1.0
Material 3 defines a 15-step type scale across five role families — displayLarge/Medium/Small, headlineLarge/Medium/Small, titleLarge/Medium/Small, bodyLarge/Medium/Small, labelLarge/Medium/Small — exposed as MaterialTheme.typography.<role>. Reference the role; do not set fontSize, fontWeight, lineHeight, and letterSpacing ad hoc. Roles encode hierarchy, density, and accessibility-tested defaults; ad hoc styles drift across screens and break Dynamic Type.
Loaded when retrieval picks the atom as adjacent / supporting.
TypographyScaleTokens [rule] v0.1.0
Material 3 defines a 15-step type scale across five role families — displayLarge/Medium/Small, headlineLarge/Medium/Small, titleLarge/Medium/Small, bodyLarge/Medium/Small, labelLarge/Medium/Small — exposed as MaterialTheme.typography.<role>. Reference the role; do not set fontSize, fontWeight, lineHeight, and letterSpacing ad hoc. Roles encode hierarchy, density, and accessibility-tested defaults; ad hoc styles drift across screens and break Dynamic Type.
Checks
- Text styles come from
MaterialTheme.typography.<role>passed viaText(text, style = ...). - Screen titles use
titleLargeorheadlineSmalldepending on prominence; do not invent 24sp+bold yourself. - Body copy uses
bodyLarge(default reading text) orbodyMedium; captions and metadata usebodySmallorlabelSmall. - Buttons inherit
labelLargefromButtondefaults; don't override with custom sp values. - Custom typography overrides happen by replacing the
Typographyin theMaterialTheme(...)setup, not by passing inlineTextStyleeverywhere.
Label
Use Material 3 type scale roles (display/headline/title/body/label)
Loaded when retrieval picks the atom as a focal / direct hit.
TypographyScaleTokens [rule] v0.1.0
Material 3 defines a 15-step type scale across five role families — displayLarge/Medium/Small, headlineLarge/Medium/Small, titleLarge/Medium/Small, bodyLarge/Medium/Small, labelLarge/Medium/Small — exposed as MaterialTheme.typography.<role>. Reference the role; do not set fontSize, fontWeight, lineHeight, and letterSpacing ad hoc. Roles encode hierarchy, density, and accessibility-tested defaults; ad hoc styles drift across screens and break Dynamic Type.
Checks
- Text styles come from
MaterialTheme.typography.<role>passed viaText(text, style = ...). - Screen titles use
titleLargeorheadlineSmalldepending on prominence; do not invent 24sp+bold yourself. - Body copy uses
bodyLarge(default reading text) orbodyMedium; captions and metadata usebodySmallorlabelSmall. - Buttons inherit
labelLargefromButtondefaults; don't override with custom sp values. - Custom typography overrides happen by replacing the
Typographyin theMaterialTheme(...)setup, not by passing inlineTextStyleeverywhere.
Label
Use Material 3 type scale roles (display/headline/title/body/label)
Label
Use Material 3 type scale roles (display/headline/title/body/label)
Source
prime-system/examples/android-compose/primes/compiled/@android-compose/rule-typography-scale-tokens/atom.yaml