View Source LabeledContent

<LabeledContent>

Presents an element with an associated label.

Overview

Use the content and label children to create this element.

<LabeledContent>
    <Text template="label">Price</Text>
    <Text template="content">$100.00</Text>
</LabeledContent>

Formatting Values

A value can be automatically formatted when the format attribute is used. In this case, all child elements are used as the label, and the value attribute stores the content. For more details on formatting options, see <Text>.

<LabeledContent value={100} format="currency" currencyCode="usd">
    Price
</LabeledContent>

Attributes

Children

  • content - The element to label.
  • label - A description of the content.

References

Automatically formats the value of the value attribute.

Discussion

For more details on formatting options, see <Text>.