Event handlers
Learn how to trigger actions and queries in response to user interactions.
Event handlers allow you to trigger queries, control components, and perform other actions in response to user interactions, all without writing custom JavaScript.
You can add event handlers in response to component events—similar to addEventListener events in native JavaScript and onChange events in React—or in response to queries. For example, you can create an event handler to trigger a query in response to a button click, or in response to a successful table update.
Use in response to component events
Create event handlers in response to component events in the Interaction section of the Inspector by clicking + next to Event handlers.
The available events depend on the attached component. For example, Text Input components have Submit, Change, Focus, and Blur events, while Button components only have a Click event. The component library contains a full reference of these events.