doc-burger

What are front end triggers and actions?

Building Projects and Dashboards: Learn about two fundamental front end concepts in Peaka.

Front end triggers and actions are essential concepts in Peaka that enable you to create dynamic and interactive behaviors for your components. This article introduces you to these fundamental front end concepts and how they work together.

Front End Flow Setup

In Peaka, every component has a front end flow associated with it, allowing you to define actions that occur in response to specific triggers. To access and configure these flows, follow these steps:

  1. Select a component: Start by clicking on the component you want to work with. Ensure that the "Show flow" switch is turned on, as depicted in the image below:
open flow with switch
  1. Create a new flow: Within the flow of the selected component, click on the "Create a new flow" button. This step is the foundation for defining the behavior of your component.

Triggers

Triggers are the events or situations that initiate actions in response to user interactions or system events. Peaka provides a variety of triggers depending on the type of component you are working with. For example, a button component may have triggers such as "On Click," "On Mouse Enter," or "On Mouse Leave." These triggers define when actions should be executed, offering a high degree of interactivity, as illustrated below:

options of trigger events

Actions

Actions are the specific tasks or operations you want to perform when a trigger is activated. Peaka offers a wide range of actions, including "Set Variable," "Get a Record," and more. Actions define what happens when a trigger condition is met. The image below showcases some of the available actions in Peaka:

all nodes of flow

Front end triggers and actions empower you to create dynamic and responsive user experiences within your Peaka projects. By defining when and what actions should occur, you can build interactive applications and dashboards tailored to your unique requirements.