Button Component Reference

Table of Contents


Introduction

Syntax

tml`<Button text="Button text"/>`
tml`<Button>Button text</>`

The Button component creates a <button> with text. The if the text attribute is present it contains the string to be displayed. Otherwise the children are used for the button text.

The btnId attribute contains an ID string that's used to record user button presses. The event is recorded using ID button-${btnId}.

Attributes

Instance methods

These methods are intended to be used by parent components to dynamically change the properties of the rendered components without re-rendering.

Inherited methods

Children

If a text attribute is present all children are ignored. If a text attribute is not present, then the children are used as the button text.

DOM element properties