A button consists of a skin, which changes based on the current state of the button.
You can create a custom skin by implementing the ISkin interface.
A button has an up, down, selected, and disabled state.

The following image shows a Button instance in the up state:

You can also use the toggle property to make the button behave like a toggle switch.

Property Detail

selected

toggle

toggle:Boolean

Gets or sets the toggle property of the button.
When set to true, the button's selected state is toggled when the button is released. When the user touches the
button, the button remains selected. When the user touches the button again, the button is released.