Extends Gesture.Tap and Gesture

Interaction.Button

An interaction to add simple, touch button behavior to an item.

The button interaction combines the Gesture.Tap "Button" tap style behavior with a fade animation, like that used by Apple.Button.

Text {
    text: "Button"
    color: #0007FF

    with Interaction.Button {
        on tapped {
            System.log("Button tapped!")
        }
    }
}

The following example shows the interaction applied to three different buttons.

property Float fade: 0.2

The amount to fade the container item when the button is pressed.