Text

tile/text

Shows text content with optional typography styling. Configure the appearance by using variant, weight, color, italic, and strikethrough settings.

Properties 

NameRequiredLightning TypeDefaultDescription
colorNolightning__textTypedefaultA semantic color for the text, which defaults to the surface’s standard text color.
isItalicNolightning__booleanTypefalseSpecifies whether the text is rendered in an italic style.
isStrikethroughNolightning__booleanTypefalseSpecifies whether the text is rendered with a strikethrough.
textYeslightning__multilineTextTypePlain text in a paragraph by default. Any inline markup or formatting syntax are removed.
variantNolightning__textTypebodyThe semantic typography level to determine the heading level or text role. The default is body.
weightNolightning__textTypeThe font weight for the text. Omit this setting to use the variant’s default weight.

Usage 

Use tile/text for plain, styled text content or a simple string without markup.

For rich formatted content with markup, lists, or links, use tile/markdown instead.

Note

1{
2    "definition": "tile/text",
3    "attributes": {
4        "text": "Your order has shipped."
5    }
6}

To specify a semantic role, use the variant attribute to specify a value for body text, code, or a heading level. You can also specify the font weight using the weight attribute.

1{
2    "definition": "tile/text",
3    "attributes": {
4        "text": "Account balance",
5        "variant": "h2",
6        "weight": "semibold"
7    }
8}

Variants 

Use these variant values to express hierarchy or role. Styling on variants can vary across surfaces.

  • body (default): Standard paragraph text
  • caption: Small supplementary text
  • code: Text that represents code, technical identifiers, or commands
  • h1: The main heading on a page
  • h2: The second heading
  • h3: The third heading
  • h4: The fourth heading
  • h5: The fifth heading
  • h6: The sixth heading

Consider these guidelines when working with text.

  • Use color for semantic states like error, success, or muted instead of embedding presentational styling in the string.
  • Use isItalic for emphasis and isStrikethrough for content that’s superseded or deleted.

Limitations 

Note any limitations that apply to this component.

Slackbot 

No known limitations for tile/text in Slackbot.

ChatGPT 

No known limitations for tile/text in ChatGPT.

Agentforce 

No known limitations for tile/text in Agentforce.

See Also 

Beta Feature

Headless Experience Layer is a pilot or beta service that is subject to the Beta Services Terms at Ageements - Salesforce.com or a written Unified Pilot Agreement if executed by Customer, and applicable terms in the Product Terms Directory. Use of this pilot or beta service is at the Customer's sole discretion.

DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!