Skip to content

Content

Text

Body text with size and tone variants.

import { Text } from '@var-ui/react';

Body text with secondary tone.

Text

Body text with size and tone variants.

Examples

Default

Body text with secondary tone.

Demo.tsxTSX
import { Text } from '@var-ui/react';

<Text tone="secondary">Body text with secondary tone.</Text>

Tones

primary is the default text color and secondary is for supporting copy. accent, success, warning, danger and info use the matching semantic tone’s foreground color, for example danger for errors and validation messages.

Primary text is the default.

Secondary text for supporting copy.

Accent text for emphasis.

Success text for confirmations.

Warning text for cautions.

Danger text for errors and validation messages.

Info text for neutral notices.

Demo.tsxTSX
import { Stack, Text } from '@var-ui/react';

<Stack gap="xs">
  <Text>Primary text is the default.</Text>
  <Text tone="secondary">Secondary text for supporting copy.</Text>
  <Text tone="accent">Accent text for emphasis.</Text>
  <Text tone="success">Success text for confirmations.</Text>
  <Text tone="warning">Warning text for cautions.</Text>
  <Text tone="danger">Danger text for errors and validation messages.</Text>
  <Text tone="info">Info text for neutral notices.</Text>
</Stack>

Emphasis and labels

weight covers normal, medium, semibold and bold; size runs xs–xl. eyebrow renders an uppercase label treatment (STEPS, COST, section labels) — combine it with size="xs" and a tone for overline labels.

Steps

128.4k

Semibold emphasis

Bold emphasis

Demo.tsxTSX
import { Stack, Text } from '@var-ui/react';

<Stack gap="sm">
  <Text eyebrow size="xs" tone="secondary">Steps</Text>
  <Text size="xl" weight="bold">128.4k</Text>
  <Text weight="semibold">Semibold emphasis</Text>
  <Text weight="bold">Bold emphasis</Text>
</Stack>

Whitespace and clamping

whiteSpace="pre-wrap" preserves newlines and wrapping (agent output, memory bodies). lineClamp takes any line count — 1 renders a single-line ellipsis, anything else uses the -webkit-line-clamp box (counts above 3 go through the --var-ui-text-block-lineclamp variable).

Agent output

Step 1: index rebuilt Step 2: pending review

The migration stalls whenever a shard reports a partial heartbeat, because the reconciliation job treats every retry as a fresh conflict and rewrites the target row.

The migration stalls whenever a shard reports a partial heartbeat, because the reconciliation job treats every retry as a fresh conflict and rewrites the target row.

Demo.tsxTSX
import { Stack, Text } from '@var-ui/react';

<Stack gap="sm">
  <Text eyebrow size="xs" tone="secondary">Agent output</Text>
  <Text whiteSpace="pre-wrap">{'Step 1: index rebuilt\nStep 2: pending review'}</Text>
  <Text lineClamp={2} tone="secondary">The migration stalls whenever a shard…</Text>
  <Text lineClamp={20}>The migration stalls whenever a shard…</Text>
</Stack>

Props

Accessibility

Built on React Aria Components where applicable.