Text

Typography primitive. Prefer Text over raw elements so size, weight, and color stay on the token scale.

Size

size 1
The quick brown fox jumps over the lazy dog
size 2
The quick brown fox jumps over the lazy dog
size 3
The quick brown fox jumps over the lazy dog
size 4
The quick brown fox jumps over the lazy dog
size 5
The quick brown fox jumps over the lazy dog
size 6
The quick brown fox jumps over the lazy dog
size 7
The quick brown fox jumps over the lazy dog
size 8
The quick brown fox jumps over the lazy dog
size 9
The quick brown fox jumps over the lazy dog

Weight

light
Weight light
regular
Weight regular
medium
Weight medium
semibold
Weight semibold
bold
Weight bold

Color

primary
Color primary
secondary
Color secondary
tertiary
Color tertiary
quaternary
Color quaternary
error
Color error
success
Color success
warning
Color warning
info
Color info

Other

uppercase · wide
Section label
mono
123,456.78 CAD
relaxed leading
Relaxed leading for longer helper copy in dense forms.
truncate
This is intentionally long text to show single-line truncation.

Developer

import { Text } from "@financial-tracking/design-system"

API reference

Polymorphic via as. Defaults to span.

PropTypeDefault
size"1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"—
weight"light" | "regular" | "medium" | "semibold" | "bold"—
color"primary" | "secondary" | "tertiary" | "quaternary" | "error" | "success" | "warning" | "info"—
align"left" | "center" | "right"—
transform"uppercase" | "lowercase" | "capitalize" | "none"—
spacing"tight" | "normal" | "wide"—
leading"tight" | "normal" | "relaxed" | "subhead"—
font"sans" | "serif" | "mono""sans"
asElementType"span"
truncateboolean—
trimboolean—