Text
A text primitive with size, tone, mono, and truncation options.
beta
Try it
Review the latest build before deploying.
<Text>Review the latest build before deploying.</Text>Examples
Description
Review the latest build before deploying to production.
<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.
<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
<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.
<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 Text from '@tcpsystems/ui/foundation/Text';| Prop | Type | Default |
|---|---|---|
size? | 'sm' | 'md' | 'lg' | 'md' |
tone? | TextTone | 'neutral' |
mono? | boolean | false |
truncate? | boolean | false |
as? | 'p' | 'span' | 'div' | 'p' |
| Snippet |
|---|
children |
| Hook | Kind |
|---|---|
.tcp-text | Root class |
data-mono | Data attribute |
data-size | Data attribute |
data-tone | Data attribute |
data-truncate | Data attribute |