HomeGetting StartedColor SystemTypographySpacingIconographyLayoutInstallationUsageAngularBlazorReactSvelteVueThemingTypographyCustomizationCSS-Only ComponentsFormsIconsIllustrationsAccessibilityGlobal ConfigurationTailwind CSSSass LibraryForge MCP ServerDropdown OptionsFocus Indicator ClippingAll componentsButtonButton AreaChipFloating Action ButtonIcon ButtonSplit ButtonAutocompleteButton ToggleCalendarCheckboxChip FieldColor PickerDate PickerDate Range PickerFile PickerLabelRadioSelectSliderSwitchText FieldTime PickerApp BarApp LauncherDrawerMenuPaginatorSkip LinkStepperTabsView SwitcherAccordionApp LayoutCardDividerExpansion PanelScaffoldSplit ViewStackStructured CardToolbarBadgeBannerBusy IndicatorCircular ProgressDialogInline MessageLinear ProgressPage StateSkeletonToastTooltipAvatarIconKeyLabel ValueListMeterSecretTableTimelineTimestampTreeKeyboard ShortcutPopoverIntroductionColorTypographySpacingShapeBorderElevationLayeringAnimationUsageIcon LibraryBlocksRoadmapChangelogBlog

Label Value

Label values display a label and value pair in a compact format with the proper typography and spacing styles applied.

NameAda Lovelace

Usage

forge-label-value displays a readonly label and value pair, with an optional leading icon slot, plus empty, ellipsis, and inline. Use it for data the user can view but not edit, most often inside a card or a submitted form; reach for a text field with disabled instead only when the value is still part of an editable form. For long, text-heavy content, use a list instead — label value is meant for succinct data.

Rules

Do
Use label value for readonly data with a short label and a short value.Use it in place of a disabled text field when the value will never be edited on that screen.Communicate elsewhere on the page whether and how the value can be edited.
Don't
Don't use label value for long titles or paragraphs of text — use a list instead.Don't fill a screen with disabled text fields when label value pairs would read more clearly.Don't imply interactivity — label value has no hover or focus state.

With an icon

Pair the value with a leading icon via the icon slot to reinforce its meaning.

An icon in the icon slot sits beside the label.

Inline

Set inline to place the label and value on the same line instead of stacking them.

Inline places the label and value side by side.

Empty

Set empty to give a missing value distinct styling instead of leaving it blank.

Empty gives a missing value distinct styling instead of leaving it blank.

Ellipsis

Set ellipsis to truncate a value that’s too long for its container.

Ellipsis truncates a value that's too long for its container.

Label values are used to display a label and value pair in a compact format with the proper typography and spacing styles applied.

import "@tylertech/forge/label-value";
Properties
PropertyAttributeTypeDefaultDescription
emptyemptybooleanfalseIf present, the value will be displayed in an alternative emphasized style.
ellipsisellipsisbooleanfalseIf present, the value will be truncated with an ellipsis if it overflows its container.
inlineinlinebooleanfalseIf present, the label and value will be displayed on the same line.
dense—booleanfalseDeprecated. Use `inline` instead.
Slots
NameDescription
labelThe label to display.
valueThe value to display.
iconAn icon to display next to the label.
CSS Parts
NameDescription
::part(root)The root layout container element.
::part(label)The label container element.
::part(value)The value container element.
::part(icon)The icon container element.
CSS Custom Properties
NameDescription
--forge-label-value-alignAligns the label and value. Possible values: `start` (default), `center`, `end`.
--forge-label-value-label-spacingThe spacing between the label and value.
--forge-label-value-label-block-start-spacingThe block start spacing for the label.
--forge-label-value-label-block-end-spacingThe block end spacing for the label.
--forge-label-value-label-colorThe color to apply to the label.
--forge-label-value-icon-spacingThe spacing between the icon and the label.
--forge-label-value-inline-label-spacingThe spacing between the label and value when displayed inline.
--forge-label-value-empty-colorThe color to apply to the value when empty.
--forge-label-value-empty-styleThe font-style to apply to the value when empty.

Accessibility documentation coming soon.

Loading Forge chat…