Appearance
Adding Styled Buttons β
Styled buttons have the same CSS styling as other app buttons (e.g., NEW ROW button, BULK ACTIONS button, etc.).
Styled buttons can be used in computed fields and hooks using the wpda.button() function. Use the callback to implement your own custom action.
β¨ Example: Adding a Styled Button Using a Computed Field β
js
wpda.button(
"Buy For $ {:price}",
(() => {
// Implement your custom action here
window.open("{:amazon_link}")
})
)π The computed field must be of type Code.
π Allow inline HTML must be enabled.
π‘ Screenshot Showing the Styled Buttons β

β¨ Example: Adding a Styled Button Using a Hook β
This example uses the
customActionsStophook, but the approach also works for other hooks.
js
((table) => {
return wpda.button(
"βSpecial Offersβ",
(() => {
// Implement your custom action here
window.open("https://my.special.offers/")
})
)
})π‘ Screenshot Showing the Styled Button β

