AI Assistant

Typography

Cherry offers two distinct sets of typography definitions: one for desktop and another for mobile. These comprehensive definitions ensure that type displays correctly on screens of all sizes. The Desktop (LG) values apply from the lg breakpoint (992px) and up, while the Mobile (XS) values are the base scale used on narrower screens.

StyleFontSizeLine HeightWeight
Hero1Inter128px1.1700
Hero2Inter96px1.1700
Hero3Inter72px1.1700
H1Inter60px1.4700
H2Inter36px1.5700
H3Inter30px1.5700
H4Inter24px1.5700
H5Inter20px1.5700
H6Inter18px1.6700
TextInter16px1.7400
StrongInter16px1.7700
SmallInter14px1.7400
BlockquoteInter18px1.7400
CodeMono16px1.7400
Button SmallInter14px1.0600
ButtonInter16px1.0600
Button BigInter18px1.0600
Input SmallInter14px1.0400
InputInter16px1.0400
Input BigInter18px1.0400

The Weight column is part of the design spec. In code, the typography mixins only set font-size and line-height, so heading weights come from the browser's bold defaults for h1 to h6 unless you set font-weight yourself. The Button (600) and Input (400) components set their own weights.

Usage

Nearly every style above is available as a ready-made CSS mixin exported from cherry-styled-components: styledHero1, styledHero2, styledHero3, styledH1 through styledH6, styledText, styledStrong, styledSmall, styledBlockquote, styledCode, styledButton, styledButtonBig, styledInput, and styledInputBig. Each mixin takes the theme and returns the responsive font-size and line-height, switching from the mobile to the desktop values at the lg breakpoint:

import styled from "styled-components";
import { styledH1 } from "cherry-styled-components";

const Title = styled.h2`
  ${({ theme }) => styledH1(theme)}
`;

For scales without a dedicated mixin (like Button Small and Input Small) or for custom theme keys, use the createTypographyStyle factory, e.g. createTypographyStyle("buttonSmall").

To apply these styles in code, use the exported typography helpers, and see Theme for font tokens.

Styles can be found in the Figma Template in the Typography section of the Foundations page.