Skip to content
tcpsystemsui

Theme

Colour scheme
Accent
Density
Radius
Esc

Text

A text primitive with size, tone, mono, and truncation options.

beta

Try it

Review the latest build before deploying.

Svelte
<Text>Review the latest build before deploying.</Text>

Examples

Description

Review the latest build before deploying to production.

Description.svelte
<script lang="ts">
	import Text from '@tcpsystems/ui/foundation/Text';
</script>

<Text>Review the latest build before deploying to production.</Text>

Tones

Deployment queued.

Last checked two minutes ago.

All health checks passed.

One service is nearing its memory limit.

Build failed. Fix the type errors and retry.

Tones.svelte
<script lang="ts">
	import Text from '@tcpsystems/ui/foundation/Text';
	import Stack from '@tcpsystems/ui/foundation/Stack';
</script>

<Stack gap="sm">
	<Text>Deployment queued.</Text>
	<Text tone="muted">Last checked two minutes ago.</Text>
	<Text tone="ok">All health checks passed.</Text>
	<Text tone="warn">One service is nearing its memory limit.</Text>
	<Text tone="danger">Build failed. Fix the type errors and retry.</Text>
</Stack>

Sizes and inline

Your release is ready for review.

Three services will be updated.

Built today at 14:32 UTC.

Build release-2026.11.06
Sizes and inline.svelte
<script lang="ts">
	import Text from '@tcpsystems/ui/foundation/Text';
	import Stack from '@tcpsystems/ui/foundation/Stack';
</script>

<Stack>
	<Text size="lg">Your release is ready for review.</Text>
	<Text>Three services will be updated.</Text>
	<Text size="sm">Built today at 14:32 UTC.</Text>
	<Text as="div">Build <Text as="span" mono>release-2026.11.06</Text></Text>
</Stack>

Truncated filename

production-workspace-invoices-2026-11-all-services-consolidated-export.csv

Invoice export is ready to download.

Truncated filename.svelte
<script lang="ts">
	import Text from '@tcpsystems/ui/foundation/Text';
	import Grid from '@tcpsystems/ui/foundation/Grid';
	const filename = 'production-workspace-invoices-2026-11-all-services-consolidated-export.csv';
</script>

<Grid min="sm">
	<Text truncate title={filename}>{filename}</Text>
	<Text tone="muted">Invoice export is ready to download.</Text>
</Grid>

API

Import
import Text from '@tcpsystems/ui/foundation/Text';
PropTypeDefault
size?'sm' | 'md' | 'lg''md'
tone?TextTone'neutral'
mono?booleanfalse
truncate?booleanfalse
as?'p' | 'span' | 'div''p'
Snippet
children
HookKind
.tcp-textRoot class
data-monoData attribute
data-sizeData attribute
data-toneData attribute
data-truncateData attribute