RichText

A component for displaying rich text content with HTML formatting support.

组件展示

Bold text and italic text with colored highlights.

  • Bullet point one
  • Bullet point two

属性

属性名
类型
必需性
描述
id*
ComponentId
必需
暂无描述
accessibility
AccessibilityAttributes
可选
暂无描述
styles
Styles
可选
Component style properties
weight
number
可选
The relative weight of this component within a Row or Column. This is similar to the CSS 'flex-grow' property. Note: this may ONLY be set when the component is a direct descendant of a Row or Column.
component*
"RichText"
必需
暂无描述
text*
string | DataBinding | object
必需
Represents a string
variant
"h1" | "h2" | "h3" | "h4" | "h5" | "caption" | "body"
可选
A hint for the text style, used to set the base font size and style.
可选值: h1, h2, h3, h4, h5, caption, body
linksEnable
boolean
可选
Whether to allow clicking on links. Defaults to true. When set to false, links will not be clickable.

代码示例

{
  "component": "RichText",
  "id": "richtext_1",
  "text": "示例text"
}