Typography

ELEMENTS includes two font families and built-in heading utility classes for establishing clear visual hierarchy.

Font families

FontUsageWeight
InterBody text, UI labelsRegular, Medium
LexendHeadings, display textBold

Inter is set as the default font for all elements. Heading classes automatically switch to Lexend-Bold.

Heading classes

Apply heading styles with .ClassName("h1"), .ClassName("h2"), or .ClassName("h3"):

new VerticalGroup(
    new Label("Page title").ClassName("h1"),
    new Label("Section heading").ClassName("h2"),
    new Label("Subsection").ClassName("h3"),
    new Label("Body text uses Inter Regular by default.")
).ClassName("gap-3");

Scale reference

ClassFontSize
.h1Lexend-Bold32px
.h2Lexend-Bold24px
.h3Lexend-Bold20px
(default)Inter-Regular14px

Combining with other classes

Heading classes work with any other utility classes:

new Label("Dashboard").ClassName("h1 mb-4");