Text Component Reference

Table of Contents


Introduction

Syntax

tml`<Text text="my text" .../>`
tml`<String text="my text" .../>`

The Text component creates inline text. The text attribute contains the string to be displayed. The normal component build process will convert template stings to Text components so, normally templates returned by the render() method need not use Text components.

A String component is an alias for a Text component.

Note: The text is represented by a DOM text node. If any attribute other than text is supplied (for example className, style, or any other <span> attribute), then the text node is wrapped in a that receives those attributes.

Attributes

Children

The Text component ignores all children.

DOM element properties