Skip to main content

RichText

A text block with explicitly styled runs and links.

Props​

PropTypeRequired
accessibilityHintstringNo
enabledbooleanNo
labelstringNo
runslistNo
semanticsstringNo
textstringNo

Types describe evaluated values. Literal native attributes use the declared decoder; use bind-* for expressions. any still has the semantic constraints listed below. Common document attributes (class, state, show, etc.) are separate from props.

Example​

<RichText bind-runs="[{text:'Hello '},{text:'world',bold:true}]" />

Defaults, values, and validation​

At most 512 runs. Each requires text and permits bold/italic/code booleans and url. Arbitrary HTML is unsupported. Links emit link rather than bypassing host navigation.

Unknown props, wrong types, missing required props, and unsupported child structure fail validation. Use attributes for evaluated input and diagnostics for recovery.

Events​

on-link

link carries {url: string} for the host to handle.

Local commands​

No local commands.

Native primitive index · Events · Host APIs