Overview
Angular Material’s typography system controls text styles across all components, including font families, font weights, font sizes, and line heights. The typography configuration is based on Material Design’s type scale.Typography Configuration
Typography is configured as part of the theme using themat.theme mixin.
Single Font Family
The simplest approach is to specify a single font family:theme.scss
- Applies Roboto to all text in Material components
- Uses font weight 700 for bold text
- Uses font weight 500 for medium text
- Uses font weight 400 for regular text
Advanced Typography Map
For more control, provide a typography map with separate font families for plain and brand text:theme.scss
Font family for body text, buttons, and most UI elements
Font family for headings, titles, and prominent text
Font weight for bold text (typically 700-900)
Font weight for medium emphasis text (typically 500-600)
Font weight for regular text (typically 300-400)
Material Design Type Scale
Angular Material implements the Material Design type scale with the following levels:Display Large
Display Large
Largest heading size, used for hero sectionsCSS Variable:
--mat-sys-display-largeDefault Size: 57px / 64px line heightDisplay Medium
Display Medium
Large heading size for section headersCSS Variable:
--mat-sys-display-mediumDefault Size: 45px / 52px line heightDisplay Small
Display Small
Smaller heading for subsectionsCSS Variable:
--mat-sys-display-smallDefault Size: 36px / 44px line heightHeadline Large
Headline Large
Large headline textCSS Variable:
--mat-sys-headline-largeDefault Size: 32px / 40px line heightHeadline Medium
Headline Medium
Medium headline textCSS Variable:
--mat-sys-headline-mediumDefault Size: 28px / 36px line heightHeadline Small
Headline Small
Small headline textCSS Variable:
--mat-sys-headline-smallDefault Size: 24px / 32px line heightTitle Large
Title Large
Large title text, used in dialogs and cardsCSS Variable:
--mat-sys-title-largeDefault Size: 22px / 28px line heightTitle Medium
Title Medium
Medium title textCSS Variable:
--mat-sys-title-mediumDefault Size: 16px / 24px line heightFont Weight: MediumTitle Small
Title Small
Small title textCSS Variable:
--mat-sys-title-smallDefault Size: 14px / 20px line heightFont Weight: MediumBody Large
Body Large
Large body text for prominent contentCSS Variable:
--mat-sys-body-largeDefault Size: 16px / 24px line heightBody Medium
Body Medium
Default body text sizeCSS Variable:
--mat-sys-body-mediumDefault Size: 14px / 20px line heightBody Small
Body Small
Small body text for secondary contentCSS Variable:
--mat-sys-body-smallDefault Size: 12px / 16px line heightLabel Large
Label Large
Large label text for buttons and tabsCSS Variable:
--mat-sys-label-largeDefault Size: 14px / 20px line heightFont Weight: MediumLabel Medium
Label Medium
Medium label textCSS Variable:
--mat-sys-label-mediumDefault Size: 12px / 16px line heightFont Weight: MediumLabel Small
Label Small
Small label text for hints and captionsCSS Variable:
--mat-sys-label-smallDefault Size: 11px / 16px line heightFont Weight: MediumLoading Fonts
Google Fonts
Load fonts from Google Fonts in yourindex.html:
index.html
Custom Fonts
To use custom fonts, include them via@font-face in your global styles:
styles.scss
theme.scss
Using Typography Styles
In Templates with Utility Classes
Enable utility classes in your theme:theme.scss
In Component Styles with CSS Variables
Use CSS variables directly:my-component.scss
Typography Best Practices
Maintain Type Hierarchy
Maintain Type Hierarchy
Use the type scale to create clear visual hierarchy:
- Display styles for hero content
- Headline styles for page and section titles
- Title styles for card headers and dialogs
- Body styles for main content
- Label styles for buttons, tabs, and captions
Load Only Needed Font Weights
Load Only Needed Font Weights
Only load the font weights you’ll actually use:
Use font-display: swap
Use font-display: swap
When loading custom fonts, use
font-display: swap to prevent invisible text during font loading:Provide Font Fallbacks
Provide Font Fallbacks
Always specify fallback fonts:
Avoid ALL CAPS in Content
Avoid ALL CAPS in Content
Using ALL CAPS in content causes issues for screen readers and localization. Use CSS
text-transform if needed:Examples
Complete Typography Setup
Next Steps
Theming
Learn about the complete theming system
Accessibility
Ensure your typography is accessible
Material Design Type Scale
Material Design typography specification
Google Fonts
Browse and select fonts