Typography
Text style utilities that set font size, weight and line height together.
Dify UI ships its type scale as Tailwind CSS utilities. Each utility sets font size, font weight and line height together, and a few also set uppercase text. Use one utility per text element instead of combining text-*, font-* and leading-* classes.
Names follow <role>-<size>-<weight>. Color is separate: pair a type utility with a text color token such as text-text-secondary.
System
System styles are for interface text: labels, menu items, buttons and metadata.
| Utility | Size | Weight | Line height | Sample |
|---|---|---|---|---|
system-2xs-regular-uppercase | 10px | 400 | 12px | The quick brown fox |
system-2xs-regular | 10px | 400 | 12px | The quick brown fox |
system-2xs-medium | 10px | 500 | 12px | The quick brown fox |
system-2xs-medium-uppercase | 10px | 500 | 12px | The quick brown fox |
system-2xs-semibold-uppercase | 10px | 600 | 12px | The quick brown fox |
system-xs-regular | 12px | 400 | 16px | The quick brown fox |
system-xs-regular-uppercase | 12px | 400 | 16px | The quick brown fox |
system-xs-medium | 12px | 500 | 16px | The quick brown fox |
system-xs-medium-uppercase | 12px | 500 | 16px | The quick brown fox |
system-xs-semibold | 12px | 600 | 16px | The quick brown fox |
system-xs-semibold-uppercase | 12px | 600 | 16px | The quick brown fox |
system-sm-regular | 13px | 400 | 16px | The quick brown fox |
system-sm-medium | 13px | 500 | 16px | The quick brown fox |
system-sm-medium-uppercase | 13px | 500 | 16px | The quick brown fox |
system-sm-semibold | 13px | 600 | 16px | The quick brown fox |
system-sm-semibold-uppercase | 13px | 600 | 16px | The quick brown fox |
system-md-regular | 14px | 400 | 20px | The quick brown fox |
system-md-medium | 14px | 500 | 20px | The quick brown fox |
system-md-semibold | 14px | 600 | 20px | The quick brown fox |
system-md-semibold-uppercase | 14px | 600 | 20px | The quick brown fox |
system-xl-medium | 16px | 500 | 24px | The quick brown fox |
system-xl-semibold | 16px | 600 | 24px | The quick brown fox |
Body
Body styles are for running text and descriptions.
| Utility | Size | Weight | Line height | Sample |
|---|---|---|---|---|
body-xs-regular | 12px | 400 | 16px | The quick brown fox |
body-xs-medium | 12px | 500 | 16px | The quick brown fox |
body-sm-regular | 13px | 400 | 16px | The quick brown fox |
body-sm-medium | 13px | 500 | 16px | The quick brown fox |
body-md-regular | 14px | 400 | 20px | The quick brown fox |
body-md-medium | 14px | 500 | 20px | The quick brown fox |
body-lg-regular | 15px | 400 | 20px | The quick brown fox |
body-2xl-regular | 18px | 400 | 1.5 | The quick brown fox |
Title
Title styles are for headings in panels, dialogs and pages.
| Utility | Size | Weight | Line height | Sample |
|---|---|---|---|---|
title-xs-semi-bold | 12px | 600 | 16px | The quick brown fox |
title-sm-semi-bold | 13px | 600 | 16px | The quick brown fox |
title-md-semi-bold | 14px | 600 | 20px | The quick brown fox |
title-lg-bold | 15px | 700 | 1.2 | The quick brown fox |
title-xl-semi-bold | 16px | 600 | 1.2 | The quick brown fox |
title-2xl-semi-bold | 18px | 600 | 1.2 | The quick brown fox |
title-3xl-semi-bold | 20px | 600 | 1.2 | The quick brown fox |
title-3xl-bold | 20px | 700 | 1.2 | The quick brown fox |
title-4xl-semi-bold | 24px | 600 | 1.2 | The quick brown fox |
title-5xl-semi-bold | 30px | 600 | 1.2 | The quick brown fox |
title-5xl-bold | 30px | 700 | 1.2 | The quick brown fox |
Code
| Utility | Size | Weight | Line height | Sample |
|---|---|---|---|---|
code-xs-regular | 12px | 400 | 1.5 | The quick brown fox |
code-sm-regular | 13px | 400 | 1.5 | The quick brown fox |
code-sm-semibold | 13px | 600 | 1.5 | The quick brown fox |
Keyboard
system-kbd sets the text inside a keyboard shortcut. See Kbd.
| Utility | Size | Weight | Line height | Sample |
|---|---|---|---|---|
system-kbd | 12px | 500 | 16px | The quick brown fox |
Extra theme keys
Dify UI also adds these keys to the Tailwind CSS theme, so classes such as text-2xs work alongside the default scale.
| Theme key | Value |
|---|---|
--text-2xs | 0.625rem |
The docs-* text styles on this site belong to the documentation site, not to Dify UI.