Connor Adams · Design System

core

Text

Variants

Monthly Budget Overview

Last updated 2 hours ago

+$340.00

-$85.20

Import

import { Text } from '@connor-adams/designsystem'

Usage

The single typography primitive — use it for every piece of text instead of bare tags so the type scale and token colors stay consistent. variant sets the scale step and a default tag; as overrides the tag.

<Text variant="display-sm">Net worth</Text>
<Text variant="body" tone="muted">Across all accounts</Text>
<Text variant="label" tone="muted">This month</Text>
<Text variant="body" mono>−$84.20</Text>

Variants: display-lg|display|display-sm, headline-lg|headline|headline-sm, body-lg|body|body-sm, label (uppercase eyebrow). Props: tone (default/muted/primary/positive/negative), weight, mono, align, truncate.

Props

PropTypeDefaultDescription
variantTextVariant | undefinedbody
askeyof IntrinsicElements | undefined
toneTextTone | undefineddefault
weightTextWeight | undefined
monoboolean | undefinedfalse
align"center" | "left" | "right" | undefined
truncateboolean | undefinedfalse