Close
Angular React Web Components Blazor React
Open Source

Typography in Ignite UI for React

The typography in Ignite UI for React is modeled after the Material Type System. It’s non-intrusive and optional, allowing you to modify the type styles using CSS only.

Overview

The type system is a type scale consisting of 13 different category type styles used across most components. All of the scale categories are completely reusable and adjustable by the end user.

Here’s a list of all 13 category styles as defined for the Bootstrap Theme in Ignite UI for React:

Scale CategoryFont FamilyFont WeightFont SizeText TransformLetter SpacingLine HeightCSS Variables
h1System Font5002.5 remnone-0.09375 rem3 rem--ig-h1-*
h2System Font5002 remnone-0.0312 rem2.4 rem--ig-h2-*
h3System Font5001.75 remnone02.1 rem--ig-h3-*
h4System Font5001.5 remnone0.015625 rem1.8 rem--ig-h4-*
h5System Font5001.25 remnone01.5 rem--ig-h5-*
h6System Font5001 remnone0.009375 rem1.2 rem--ig-h6-*
subtitle-1System Font400.875 remnone0.009375 rem1.5 rem--ig-subtitle-1-*
subtitle-2System Font400.9 remnone0.00625 rem1.35 rem--ig-subtitle-2-*
body-1System Font4001 remnone0.03125 rem1.5 rem--ig-body-1-*
body-2System Font400.9 remnone0.015625 rem1.5 rem--ig-body-2-*
buttonSystem Font5001 remnone0.046875 rem1.5 rem--ig-button-*
captionSystem Font400.75 remnone0.025 rem1 rem--ig-caption-*
overlineSystem Font400.625 remuppercase0.09375 rem1 rem--ig-overline-*

Each theme defines its own type scale. This means each one of the themes we ship - Material, Fluent, Bootstrap, and Indigo will have its own type scale. They all share the same scale categories, but can have different font family, weight, size, text transform, letter spacing, and line height.

Usage

Changing font family

To change the font family in all components, all you have to do is overwrite the --ig-font-family CSS variable:

:root {
  --ig-font-family: 'Helvetica Neue', sans-serif;
}

Changing type styles

The type styles are used internally by most of the components in Ignite UI for React. For instance, the igc-button component uses the button type style. To change any of the type style properties, we need to overwrite the corresponding CSS variable:

:root {
  --ig-button-font-size: 22px;
  --ig-button-line-height: 26px;
  --ig-button-text-transform: lowercase;
}

Keep in mind that this will update the global button typography styles. If you want to apply these changes to a specific button, you can make use of a class selector.