A Clickable is a component that detects clicks and other types of mouse related events, and runs a sequence of actions in response.

Type

The type of click event to detect. The possible options are:

  • Click - Run actions when the user clicks on this object.
  • Double Click - Run actions when the user double clicks on this object.
  • Button Down - Run actions when the mouse button is pushed down while the cursor is over this object.
  • Button Up - Run actions when the mouse button comes up while over this object.
  • Hover On - Run actions when the mouse pointer enters this object’s bounding region.
  • Hover Off - Run actions when the mouse pointer exits this object’s bounding region.
  • Drag - Run actions after the mouse button goes down, for as long as the mouse button stays down, even if the cursor leaves this object’s bounding region.

Actions

The actions to run when the click event is detected.

Pro Tip

A common pattern is to create a button that has several Clickable components on it: one to process the actual click when it occurs, and Hover On and Hover Off variants to turn highlight images on and off when the mouse hovers over the button.