Widget Actions
Actions allow widget components to trigger dynamic behaviors like sending messages, showing notifications, or making network requests.Action Format
Actions are objects with atype and optional payload:
Standard Action Types
lyzn.sendMessage
Send collected form data as a chat message.lyzn.showToast
Display a toast notification to the user.lyzn.openLink
Open a URL in webview or external browser.lyzn.resetState
Reset the widget’s form state.lyzn.fetch
Make a network request.Using Actions
On Buttons
UseonClickAction or action prop:
On Form Components
Form components likeSelect, RadioGroup, and Checkbox support the action prop to trigger actions on value change:
On Cards
Useconfirm and cancel props to add action buttons:
Form State Management
When a form component has aname prop, it updates the widget’s form state instead of sending a message immediately:
Value Placeholders
Use{{value}} in action payloads to inject the current value:

