Schema Explorer

Choose element:

Important note about accessibility: In version 1.3 of the schema we introduced a label property on Inputs to improve accessibility. If the Host app you are targetting supports v1.3 you should use label instead of a TextBlock as seen in some samples below. Once most Host apps have updated to the latest version we will update the samples accordingly.

TextRun

Defines a single run of formatted text. A TextRun with no properties set can be represented in the json as string containing the text as a shorthand for the json object. These two representations are equivalent.

Introduced in version 1.2

Property Type Required Description Version
type "TextRun" Yes Must be "TextRun". 1.2
text string Yes Text to display. Markdown is not supported. 1.2
color Colors No Controls the color of the text. 1.2
fontType FontType No The type of font to use 1.2
highlight boolean No If true, displays the text highlighted. 1.2
isSubtle boolean No If true, displays text slightly toned down to appear less prominent. 1.2
italic boolean No If true, displays the text using italic font. 1.2
selectAction ISelectAction No Action to invoke when this text run is clicked. Visually changes the text run into a hyperlink. Action.ShowCard is not supported. 1.2
size FontSize No Controls size of text. 1.2
strikethrough boolean No If true, displays the text with strikethrough. 1.2
underline boolean No If true, displays the text with an underline. 1.3
weight FontWeight No Controls the weight of the text. 1.2

Properties

text

Text to display. Markdown is not supported.

  • Type: string
  • Required: Yes

color

Controls the color of the text.

  • Type: Colors
  • Required: No
  • Allowed values:
    • "default"
    • "dark"
    • "light"
    • "accent"
    • "good"
    • "warning"
    • "attention"

fontType

The type of font to use

  • Type: FontType
  • Required: No
  • Allowed values:
    • "default"
    • "monospace"

highlight

If true, displays the text highlighted.

  • Type: boolean
  • Required: No

isSubtle

If true, displays text slightly toned down to appear less prominent.

  • Type: boolean
  • Required: No

italic

If true, displays the text using italic font.

  • Type: boolean
  • Required: No

selectAction

Action to invoke when this text run is clicked. Visually changes the text run into a hyperlink. Action.ShowCard is not supported.

  • Type: ISelectAction
  • Required: No
  • Allowed values:
    • Action.Execute
    • Action.OpenUrl
    • Action.Submit
    • Action.ToggleVisibility

size

Controls size of text.

  • Type: FontSize
  • Required: No
  • Allowed values:
    • "default"
    • "small"
    • "medium"
    • "large"
    • "extraLarge"

strikethrough

If true, displays the text with strikethrough.

  • Type: boolean
  • Required: No

underline

If true, displays the text with an underline.

  • Type: boolean
  • Version : 1.3
  • Required: No

weight

Controls the weight of the text.

  • Type: FontWeight
  • Required: No
  • Allowed values:
    • "default"
    • "lighter"
    • "bolder"