Render action buttons inside the widget that trigger logic in your app.
paths_cta
array passed during widget initialization.
label
: The text shown on the buttoncallback
: A function executed when the button is clickedstyle
(optional): Custom styling for the button
The callback
function is always executed in your application environment, not inside the widget. This gives you full control to run custom logic securely on your side.
Village.on()
This is a sample payload received when a CTA is clicked. All names and URLs are fictional and provided for demonstration purposes only.
Event Name | Description | Payload |
---|---|---|
village.widget.ready | Widget is initialized | — |
village.path.cta.clicked | CTA was clicked | { index, cta, context } |
village.paths_cta.updated | CTA list was dynamically updated | PathCTA[] |