A simple component for displaying text.

Add label content

Display text in a label:

<js:Label text="Hello, FlexJS"/>

Display HTML in a label:

<js:Label>
<js:html><![CDATA[<strong>display</strong> <em>a little</em> <span style="color:#ff0000">HTML</span>]]></js:html>
</js:Label>

Change label appearance

Set font styles in a single label:

<js:Label text="Hello, FlexJS">
<js:style>
<js:SimpleCSSStyles fontFamily="serif" fontSize="20"
fontWeight="bold" fontStyle="italic" color="#ff0000"/>
</js:style>
</js:Label>

Set a label's border styles:

<js:Label text="Hello, FlexJS">
<js:style>
<js:SimpleCSSStyles borderStyle="solid" borderWidth="2"
borderColor="#ff0000" borderRadius="4"/>
</js:style>
</js:Label>

Set a label's background color:

<js:Label text="Hello, FlexJS">
<js:style>
<js:SimpleCSSStyles backgroundColor="#ffcccc"/>
</js:style>
</js:Label>
  • No labels