This is an overview of the most common usage of Label. For more information about the available properties, methods, or events, head over to the complete API documentation for Label.
<Label>はテキストを表示するUIコンポーネントです。
重要: この<Label>はHTMLの<label>とは異なります。
<Label text="Label" />

テキストの一部にスタイルを反映させたい場合、FormattedStringとSpanエレメントの組み合わせが使えます。
<Label textWrap="true">
<FormattedString>
<Span text="This text has a " />
<Span text="red " style="color: red" />
<Span text="piece of text. " />
<Span text="Also, this bit is italic, " fontStyle="italic" />
<Span text="and this bit is bold." fontWeight="bold" />
</FormattedString>
</Label>| 名前 | 型 | 説明 |
|---|---|---|
text | String | ラベルのテキストを取得・設定します。 |
textWrap | Boolean | ラベルがテキストをラップするかどうかを取得・設定します。 デフォルトの値は: falseです。 |
| Android | iOS |
|---|---|
android.widget.TextView | UILabel |