Widgets/Producer

Button Widget

Button Widget

A "Producer" type widget. Button Widget provides a clickable interface that triggers an event when pressed. It's useful for starting processes or triggering actions in your workflow.

 

Features

The Button Widget creates a simple clickable control that:

  • Generates an event when clicked
  • Can be connected to any widget that accepts events
  • Provides manual control over workflow execution
  • Allows testing and debugging of workflow components

 

Outputs

  • Out (DataType: Boolean) Transmits true when the button is clicked. Can be connected to any widget that accepts boolean inputs.

 

Examples

Clock Control with Start/Stop Buttons

This example demonstrates how to use buttons to control a clock and counter system:


Drag the example onto the workspace to explore and experiment!



In this example:

  1. The Start Button widget transmits a signal to the Clock widget's start input to begin generating events every second
  2. The Stop Button widget transmits a signal to the Clock widget's stop input to halt the clock events
  3. The Clock widget transmits periodic events to the Counter widget, which increments its value by 1 for each event
  4. The Counter widget transmits its current value to the Display widget, which shows the running count in real-time

 

Image Display Trigger

This example demonstrates how to use a button to display an image from base64 data:


Drag the example onto the workspace to explore and experiment!



In this example:

  1. The Button widget triggers the Text widget containing base64 data
  2. The Text widget transmits the base64 data to the Base64 To Image widget
  3. The Base64 To Image widget converts the data and transmits it to the Display widget
  4. The Display widget shows the resulting image

 

📌 Additional Notes

  • The Button widget transmits a boolean value (true) through the out port when activated
  • Multiple Button widgets can be instantiated within the same workflow without conflicts
  • The widget operates synchronously and responds immediately to user interaction
  • No configuration parameters are required for basic operation

 

Glossary

  • Base64

    A method of encoding binary data as ASCII text, commonly used for embedding images and other binary content in text-based formats like JSON or HTML.