tuix-text

Typography and every text style in the design system.

tuix-text applies one of the design system's text styles to its slotted content. It renders inline, so it wraps a word as happily as a paragraph.

Loading the components…

The type scale

Headings run from xxl down to xs, all at weight 600.

Loading the components…

Body and field styles are lighter, for everything that is not a heading.

Loading the components…

xxl (6rem) is the hero style, and bullet_list, link and button exist so lists, links and button labels stay on the same scale; the components already use them.

Semantic colours

Loading the components…

API

Properties

PropertyAttributeTypeDefaultDescription
sizesizeTextSizebody1The text style: size, weight and line height
colorcolorTextVariantprimaryA semantic colour, resolved against the light or dark palette
darkdarkbooleanfalseResolve color against the dark palette

Sizes

TextSize values and their desktop metrics. All of them shrink at the tablet and mobile breakpoints, except field_title and field_description: those two keep the values below at every width.

ValueAttributeSize / line heightWeightUse
TextSize.XXLxxl6rem / 6.25rem600Hero
TextSize.XLxl3.375rem / 3.688rem600Page title
TextSize.Ll2.813rem / 3.375rem600Section title
TextSize.Mm2.313rem / 2.75rem600Subsection
TextSize.Ss1.938rem / 2.313rem600Card title
TextSize.XSxs1.313rem / 1.563rem600Small heading
TextSize.Body1body11.125rem / 1.688rem300Body copy
TextSize.Body2body20.938rem / 1.313rem300Secondary copy
TextSize.BulletListbullet_list1.125rem / 1.375rem300List items
TextSize.Linklink1rem / 1.25rem400Link label
TextSize.Buttonbutton1rem / 1.25rem400Button label
TextSize.FieldPlaceholderfield_placeholder1rem / 1.25rem300Field value and placeholder
TextSize.FieldTitlefield_title0.75rem / 0.875rem300Field label
TextSize.FieldDescriptionfield_description0.75rem / 0.875rem300Field helper text

Colours

TextVariant is semantic: the same value resolves to a different hex in dark mode. See Enums for the full mapping.

ValueAttributeLightDark
PRIMARYprimaryBLACKPRIMARY_50
SECONDARYsecondaryWHITEBLACK
MAINmainMAINdark MAIN
DARK_MAINdark_mainDARK_MAINdark NEUTRAL_600
GREYgreyNEUTRAL_600dark NEUTRAL_600
LIGHT_GREYlight_greyNEUTRAL_200NEUTRAL_200
DISABLEDdisabledPRIMARY_100PRIMARY_200
VALIDATIONvalidationVALIDATIONdark VALIDATION
ERRORerrorERRORdark ERROR
SUCCESSsuccessSUCCESSdark SUCCESS
LIGHTlightWHITEPRIMARY_50
DARKdarkBLACKBLACK
DARK_BLUEdark_blueDARK_MAINPRIMARY_800
TITLE_BLUEtitle_blueDARK_MAINPRIMARY_300
SECTIONsectionPRIMARY_700PRIMARY_300
STROKEstrokePRIMARY_400PRIMARY_400

Slots

SlotContent
defaultThe text. Slotted elements inherit the size and weight, so <b> or <span> inside keep the style

Notes

  • Inside tuix-link the colour is overridden by the link, which sets the --t-link-text-color custom property the text reads first.
  • The other components use tuix-text internally for their labels, so their typography follows this scale automatically.

On this page