Skip to main content
An official website of the United States government

Font Size and Family

Set the font size and the font family together.

NCIDS Fonts

To use the following Google fonts in your site, add the follow block into your HEAD

Recommended Way to Use Fonts

The NCIDS/U.S. Web Design System (USWDS) provides design tokens and utilities to set font styles.

To download fonts, refer to the Typography page.

Font Family Tokens

The NCIDS uses the same font family tokens from the USWDS and contains Type and role-based tokens.

Type-based tokens are based on the available fonts, e.g. poppins or open-sans.

Role-based tokens use the type-based tokens and are based on the role the text will play. For example, button and other input text should use the ui role; web page content should use the body role.

Role-based tokens should be used whenever possible. The idea is to group like elements so that if the font family is changed, all those elements of that role change. This helps prevent scenarios where you want to change all heading items, for example, and need to find and change all header instances in your code. It’s likely that you will miss some headings if you are manually finding and updating all instances.

Type-based Tokens

NOTE: NCIDS does not use all USWDS type-based tokens.

TokenDefaultSettings variable
'mono''roboto-mono'$theme-font-type-mono
'sans''open-sans'$theme-font-type-sans
'serif''poppins'$theme-font-type-serif

Role-based tokens

TokenDefaultSettings variable
'alt''serif'$theme-font-role-alt
'body''sans'$theme-font-role-body
'code''mono'$theme-font-role-mono
'heading''serif'$theme-font-role-heading
'ui''sans'$theme-font-role-ui

Custom NCIDS Type Scale

TokenDefaultExampleValueSettings variable
'3xs'2Tallahassee13px$theme-type-scale-3xs
'2xs'3Tallahassee14px$theme-type-scale-2xs
'xs'5Tallahassee16px$theme-type-scale-xs
'sm'7Tallahassee18px$theme-type-scale-sm
'md'8Tallahassee20px$theme-type-scale-md
'lg'9Tallahassee22px$theme-type-scale-lg
'xl'10Tallahassee24px$theme-type-scale-xl
'2xl'11Tallahassee28px$theme-type-scale-2xl
'3xl'12Tallahassee32px$theme-type-scale-3xl

Using utilities mixins

  • Use single-quoted strings in utility mixins. Do not quote numbers or px values, with the exception of half (05) values like '05', '105', and '205' which should be treated as strings.
  • String tokens for half values (05) and negative values (like neg-1)may also be written with their unquoted number token equivalent: 0.5, 1.5, 2.5, 2.5, -1, -1.5, etc
  • If multiple utilities share the same prefix (ex: .text- or .flex-) or a single utility accepts multiple kinds of values (ex: .border accepts both border weight and border color), their shared mixin can accept multiple comma-separated values: u-text('primary-darkest', 'no-underline', 'bold') or u-border-top(2px, 'accent-warm').
  • Output any utility mixin as !important by appending !important to the mixin’s argument list: u-bg('red-warm-50v', !important) Set the font weight using the u-text mixin or the font-weight function.

To set font size and family in Figma, refer to the section “Using Our Tokens and Utilities” in our Figma Guide.

Utility Modules


Font size and Family

Mixins and Functions

UtilityMixinExample
.font-family-sizeu-font(family,size)@include u-font('sans', 'sm')

Utility Classes

Utility module usage information
Module nameAre responsive modifiers turned on?Active state modifiersGzip file sizeNon-gzip file size
fontTrueNone2.41 KB13 KB
Class name
Estimated computed value
Mono (Roboto Mono Web)
.font-mono-3xs
Tuscaloosa
12.32px
.font-mono-2xs
Tuscaloosa
13.28px
.font-mono-xs
Tuscaloosa
15.2px
.font-mono-sm
Tuscaloosa
17.12px
.font-mono-md
Tuscaloosa
19.04px
.font-mono-lg
Tuscaloosa
20.96px
.font-mono-xl
Tuscaloosa
22.88px
.font-mono-2xl
Tuscaloosa
26.72px
.font-mono-3xl
Tuscaloosa
30.56px
Font Sans (Open Sans)
.font-sans-3xs
Tuscaloosa
13.12px
.font-sans-2xs
Tuscaloosa
14.24px
.font-sans-xs
Tuscaloosa
16.16px
.font-sans-sm
Tuscaloosa
18.24px
.font-sans-md
Tuscaloosa
20.32px
.font-sans-lg
Tuscaloosa
22.24px
.font-sans-xl
Tuscaloosa
24.32px
.font-sans-2xl
Tuscaloosa
28.32px
.font-sans-3xl
Tuscaloosa
32.48px
Font Serif (Poppins)
.font-serif-3xs
Tuscaloosa
13.44px
.font-serif-2xs
Tuscaloosa
14.56px
.font-serif-xs
Tuscaloosa
16.64px
.font-serif-sm
Tuscaloosa
18.72px
.font-serif-md
Tuscaloosa
20.8px
.font-serif-lg
Tuscaloosa
22.88px
.font-serif-xl
Tuscaloosa
24.96px
.font-serif-2xl
Tuscaloosa
29.12px
.font-serif-3xl
Tuscaloosa
33.12px

Font Family

Mixins and Functions

UtilityMixinExample
.font-family-familyu-font-family(family)@include u-font-family('sans')

Utility Classes

Utility module usage information
Module nameAre responsive modifiers turned on?Active state modifiersGzip file sizeNon-gzip file size
font-familyFalseNone0.37 KB2 KB
Class name
Estimated computed value
Type-based
.font-family-mono
Tuscaloosa
Roboto Mono Web
.font-family-sans
Tuscaloosa
Open Sans
.font-family-serif
Tuscaloosa
Poppins
Role-based
.font-family-alt
Tuscaloosa
Poppins
.font-family-body
Tuscaloosa
Open Sans
.font-family-code
Tuscaloosa
Roboto Mono Web
.font-family-heading
Tuscaloosa
Poppins
.font-family-ui
Tuscaloosa
Open Sans