Text
tile/text
Shows text content with optional typography styling. Configure the appearance by using variant, weight, color, italic, and strikethrough settings.
| Name | Required | Lightning Type | Default | Description |
|---|---|---|---|---|
| color | No | lightning__textType | default | A semantic color for the text, which defaults to the surface’s standard text color. |
| isItalic | No | lightning__booleanType | false | Specifies whether the text is rendered in an italic style. |
| isStrikethrough | No | lightning__booleanType | false | Specifies whether the text is rendered with a strikethrough. |
| text | Yes | lightning__multilineTextType | Plain text in a paragraph by default. Any inline markup or formatting syntax are removed. | |
| variant | No | lightning__textType | body | The semantic typography level to determine the heading level or text role. The default is body. |
| weight | No | lightning__textType | The font weight for the text. Omit this setting to use the variant’s default weight. |
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.
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.
Use these variant values to express hierarchy or role. Styling on variants can vary across surfaces.
body(default): Standard paragraph textcaption: Small supplementary textcode: Text that represents code, technical identifiers, or commandsh1: The main heading on a pageh2: The second headingh3: The third headingh4: The fourth headingh5: The fifth headingh6: The sixth heading
Consider these guidelines when working with text.
- Use
colorfor semantic states likeerror,success, ormutedinstead of embedding presentational styling in the string. - Use
isItalicfor emphasis andisStrikethroughfor content that’s superseded or deleted.
Note any limitations that apply to this component.
No known limitations for tile/text in Slackbot.
No known limitations for tile/text in ChatGPT.
No known limitations for tile/text in Agentforce.