> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainlit.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Action

The `Action` class is designed to create and manage actions to be sent and displayed in the chatbot user interface. Actions consist of buttons that the user can interact with, and these interactions trigger specific functionalities within your app.

## Attributes

<ParamField path="name" type="str">
  Name of the action, this should match the action callback.
</ParamField>

<ParamField path="payload" type="Dict">
  The payload associated with the action.
</ParamField>

<ParamField path="icon" type="str" optional>
  The lucide icon name for the action button. See [https://lucide.dev/icons/](https://lucide.dev/icons/).
</ParamField>

<ParamField path="label" type="str" optional>
  The label of the action. This is what the user will see. If no label and no icon is provided, the name is display as a fallback.
</ParamField>

<ParamField path="tooltip" type="str" optional>
  The description of the action. This is what the user will see when they hover
  the action.
</ParamField>

## Usage

```python theme={null}
import chainlit as cl

@cl.action_callback("action_button")
async def on_action(action):
    await cl.Message(content=f"Executed {action.name}").send()
    # Optionally remove the action button from the chatbot user interface
    await action.remove()

@cl.on_chat_start
async def start():
    # Sending an action button within a chatbot message
    actions = [
        cl.Action(name="action_button", payload={"value": "example_value"}, label="Click me!")
    ]

    await cl.Message(content="Interact with this action button:", actions=actions).send()
```
