Appearance
Button
A clickable button that can navigate to a URL or trigger an action. Renders as a styled <button> or <a> element.
Properties
| Property | Type | Default | Description |
|---|---|---|---|
| label | text | 'Click me' | The button text. Supports expressions. |
| href | text | '#' | The URL to navigate to when clicked. Leave as # if using an onClick action instead. |
Events
onClick-- Fires when the button is clicked. Attach an inline or reusable action to handle the click.
Example
A simple link button:
Label: View Details
Href: /products/`{ {row.slug}}`A button that triggers an action (set href to # and attach an onClick action):
Label: Delete Item
Href: #
onClick: [action] delete_itemTips
- When using
onClickwith an action, sethrefto#to prevent navigation. - Use expressions in the label for dynamic text:
{ {if(row.is_favorite, 'Unfavorite', 'Favorite')}}. - Style buttons using the Design tab -- background color, padding, border-radius, and hover states.
- For form submission, use the Submit Button widget instead -- it is specifically designed to work with the Form Container.