> For the complete documentation index, see [llms.txt](https://muradkarakas.gitbook.io/sodium_documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://muradkarakas.gitbook.io/sodium_documentation/language-reference/built-in-triggers/button_item_clicked-trigger.md).

# "button\_item\_clicked" trigger

#### Description

&#x20;`button_item_clicked` trigger function is optional. if it is needed, must be in [Code Behind File](/sodium_documentation/language-reference/program-structure/code-behind-file.md) or [Controller File](/sodium_documentation/language-reference/program-structure/controller-file.md).\
&#x20;Whenever a button in data block or control block is clicked, `button_item_clicked` trigger is fired.\
&#x20;\``button_item_clicked` trigger has 1 variant:\
&#x20;`button_item_clicked` trigger is a function with a specific name. Trigger function and its name should conform to the following format:

**Function's name format:**

> blockName + "." + buttonName

**Declaration**

```
void ButtonItemClickedTriggerFunctionName(); 
```

#### **Example**

```
void deps.show_dep_name() {
        message(:deps.dep_name);
}
```

#### **See also**
