Truncates text at its start, center, or end while preserving the full text for assistive technology.
<div nve-layout="column gap:sm" style="max-width: 16rem">
<nve-format-truncate position="start">training-pipeline-2026-08-05-production</nve-format-truncate>
<nve-format-truncate position="center">training-pipeline-2026-08-05-production</nve-format-truncate>
<nve-format-truncate position="end">training-pipeline-2026-08-05-production</nve-format-truncate>
</div>
<div nve-layout="column gap:sm" style="max-width: 16rem">
<nve-format-truncate position="start">training-pipeline-2026-08-05-production</nve-format-truncate>
<nve-format-truncate position="center">training-pipeline-2026-08-05-production</nve-format-truncate>
<nve-format-truncate position="end">training-pipeline-2026-08-05-production</nve-format-truncate>
</div>
training-pipeline-2026-08-05-production training-pipeline-2026-08-05-production training-pipeline-2026-08-05-production
Installation
<script type="module">
import '@nvidia-elements/core/format-truncate/define.js';
</script>
<div nve-layout="column gap:sm" style="max-width: 16rem">
<nve-format-truncate position="start">training-pipeline-2026-08-05-production</nve-format-truncate>
<nve-format-truncate position="center">training-pipeline-2026-08-05-production</nve-format-truncate>
<nve-format-truncate position="end">training-pipeline-2026-08-05-production</nve-format-truncate>
</div>
<script type="module">
import '@nvidia-elements/core/format-truncate/define.js';
</script>
<div nve-layout="column gap:sm" style="max-width: 16rem">
<nve-format-truncate position="start">training-pipeline-2026-08-05-production</nve-format-truncate>
<nve-format-truncate position="center">training-pipeline-2026-08-05-production</nve-format-truncate>
<nve-format-truncate position="end">training-pipeline-2026-08-05-production</nve-format-truncate>
</div>
nve api.get nve-format-truncate
nve api.get nve-format-truncate
Default
Start, center, and end positions keep the most useful part of constrained text. Choose the position that matches how users distinguish each value.
<div nve-layout="column gap:sm" style="max-width: 16rem">
<nve-format-truncate position="start">training-pipeline-2026-08-05-production</nve-format-truncate>
<nve-format-truncate position="center">training-pipeline-2026-08-05-production</nve-format-truncate>
<nve-format-truncate position="end">training-pipeline-2026-08-05-production</nve-format-truncate>
</div>
<div nve-layout="column gap:sm" style="max-width: 16rem">
<nve-format-truncate position="start">training-pipeline-2026-08-05-production</nve-format-truncate>
<nve-format-truncate position="center">training-pipeline-2026-08-05-production</nve-format-truncate>
<nve-format-truncate position="end">training-pipeline-2026-08-05-production</nve-format-truncate>
</div>
training-pipeline-2026-08-05-production training-pipeline-2026-08-05-production training-pipeline-2026-08-05-production
Typography
Inherited heading, body, and code styles keep truncated text aligned with surrounding typography. Place the component inside semantic text elements to preserve their visual hierarchy.
<div nve-layout="column gap:lg align:stretch" style="max-width: 16rem">
<h2 nve-text="heading lg">
<nve-format-truncate position="center">training-pipeline-2026-08-05-production</nve-format-truncate>
</h2>
<p nve-text="body">
<nve-format-truncate position="center">training-pipeline-2026-08-05-production</nve-format-truncate>
</p>
<code nve-text="code sm muted"
><nve-format-truncate position="center">training-pipeline-2026-08-05-production</nve-format-truncate></code
>
</div>
<div nve-layout="column gap:lg align:stretch" style="max-width: 16rem">
<h2 nve-text="heading lg">
<nve-format-truncate position="center">training-pipeline-2026-08-05-production</nve-format-truncate>
</h2>
<p nve-text="body">
<nve-format-truncate position="center">training-pipeline-2026-08-05-production</nve-format-truncate>
</p>
<code nve-text="code sm muted"
><nve-format-truncate position="center">training-pipeline-2026-08-05-production</nve-format-truncate></code
>
</div>
training-pipeline-2026-08-05-production
training-pipeline-2026-08-05-production
training-pipeline-2026-08-05-production Bias
Center truncation bias keeps units from either the start or end. Use end bias for shared suffixes and start bias for identifiers with meaningful endings.
<div nve-layout="column gap:sm" style="max-width: 16rem">
<nve-format-truncate position="center" bias="start" preserve="10"
>sha256:1234567890abcdef1234567890abcdef</nve-format-truncate
>
<nve-format-truncate position="center" bias="end" preserve="10"
>sha256:1234567890abcdef1234567890abcdef</nve-format-truncate
>
</div>
<div nve-layout="column gap:sm" style="max-width: 16rem">
<nve-format-truncate position="center" bias="start" preserve="10"
>sha256:1234567890abcdef1234567890abcdef</nve-format-truncate
>
<nve-format-truncate position="center" bias="end" preserve="10"
>sha256:1234567890abcdef1234567890abcdef</nve-format-truncate
>
</div>
sha256:1234567890abcdef1234567890abcdef sha256:1234567890abcdef1234567890abcdef
Strategy
Character, word, and path strategies preserve complete graphemes or meaningful text units. Match the strategy to identifiers, labels, or file paths.
<div nve-layout="column gap:sm" style="max-width: 16rem">
<nve-format-truncate position="center" strategy="character" preserve="8"
>experiment-π©π½βπ»-0123456789abcdef</nve-format-truncate
>
<nve-format-truncate position="center" strategy="word" preserve="3"
>NVIDIA autonomous vehicle training pipeline production run</nve-format-truncate
>
<nve-format-truncate position="center" strategy="path" preserve="2"
>/models/checkpoints/production/model.bin</nve-format-truncate
>
</div>
<div nve-layout="column gap:sm" style="max-width: 16rem">
<nve-format-truncate position="center" strategy="character" preserve="8"
>experiment-π©π½βπ»-0123456789abcdef</nve-format-truncate
>
<nve-format-truncate position="center" strategy="word" preserve="3"
>NVIDIA autonomous vehicle training pipeline production run</nve-format-truncate
>
<nve-format-truncate position="center" strategy="path" preserve="2"
>/models/checkpoints/production/model.bin</nve-format-truncate
>
</div>
experiment-π©π½βπ»-0123456789abcdef NVIDIA autonomous vehicle training pipeline production run /models/checkpoints/production/model.bin
Release Status
All elements and features go through 3 phases of stability, pre-release, beta and stable.
pre-release Docs Preview API Documentation Fully Themeable
beta Robust unit test coverages Passed API Review Passed Designer VQA Review Included in library package stable No known outstanding AA WCAG issues No known outstanding performance issues Adapts to different screen/container sizes No breaking API changes for at least 90 days