While attributes are a great way to pass data between components there is one limitation. You can only pass data from a parent component to a child component. Not the other way around.

This is where events come in. Events lets a component send a message to a parent component. Component events works almost exactly like events for HTML elements.

Defining events

Just like with attributes you can define events in the component right panel.

You must specify a name for the event as well as "Test value", an example of the payload the event will send along.

Create a new change event

Just like with attributes, the test value is only used while developing your components and has no impact on how your application will run. In this case the test value is used by parent components when defining a workflow to execute when the event fires.

Triggering events

Unlike events for HTML elements, component events are not triggered automatically. To trigger an event you have to use the Trigger action for that event.

Trigger an event using the Trigger action

The data input for the Trigger action lets you set the payload data you wish to send with the event.

Learn more about using events here: