Skip to content
MyAppBuilder
StableBasicVersion 1

Button

Overview

The main way visitors trigger something: save a record, open a page, show a dialog, send an email. Every click runs the list of actions you configure in the Actions tab.

When to use

  • "Book now" on a public page → Navigate to the booking page.
  • "Save" inside a form (Submits the surrounding form).
  • "Delete" with the danger style → Delete record after a confirmation modal.
  • "Export" → Download file.
  • "Call" → Open URL tel:+44…

When not to use

  • Only an icon is needed (toolbar): use Icon Button.
  • It is really a link to another website or page in running text: use Link.

Quick start

  1. Drag Button onto the page.
  2. Set Button text, optionally an Icon, Style and Size in the Content tab.
  3. Actions tab → On Click → Add action (Navigate, Create record, Open modal, Set state…). Actions run in order.
  4. Inside a Form, turn on Submits the surrounding form instead of adding actions — the Form's On Submit / On Success handle the save.
  5. Preview to test; actions never run in the editor.

Properties

Button texttext

Text on the button; can be bound (e.g. "Add to {{record.name}}").

Default: Button

Iconicon

Optional icon shown before the text.

Example: Plus

Styleselect

Visual importance.

Options: primary — the main action, filled, secondary — less prominent, outline — bordered, ghost — text only, danger — red, for destructive actions

Default: primary

Sizeselect

Button height and padding.

Options: sm, md, lg

Default: md

Submits the surrounding formboolean

Submits the nearest Form when clicked (after validation). The button's own On Click actions are then NOT run — put actions on the Form's events instead.

Default: false

Only works inside a Form component. Outside a form the button behaves normally.

Full widthboolean

Stretches the button across its cell — common on mobile and in forms.

Default: false

Disabledboolean

Greys out the button and ignores clicks. Can be bound to a condition, e.g. to app state or {{record.status}}.

Default: false

Tooltiptext

Hint shown on hover.

Data binding

Properties that can use dynamic data: Button text, Disabled.

Events

On click
Runs the configured actions in order. The button shows a spinner and is disabled until the actions finish, so double-clicks do not create duplicate records. Not run when Submits the surrounding form is on.

Actions

Open the Actions tab in the inspector, pick an event and add actions such as Go to page, Create record or Show message. Actions run in order; data-changing actions run on the server with the signed-in user's permissions.

Responsive behavior

Default width is 3 columns on desktop, 6 on tablet and full width on mobile. Use the Responsive tab to override, or Full width for forms.

Permissions

Use the Permissions tab to choose which app roles receive this component; the server leaves it out for everyone else. This hides the component, not the data it shows — record access is set under Users → Roles & permissions. Actions that touch data (create, update, delete) are checked again on the server with the visitor's role.

Accessibility

  • The label is the accessible name — avoid labels like "Click here"; say what happens ("Save changes").

Examples

Save inside a form

Example
Button text: Save changes
Submits the surrounding form: on
(Form → On Success: Show toast "Saved", Navigate → Customers)

Delete with confirmation

Example
Button text: Delete
Style: danger
On Click: Set state → Component state → Confirm modal → open → true

Common patterns

  • Primary style for one main action per screen; secondary or outline for the rest.
  • Use Condition actions to branch (e.g. show a toast when a field is empty).
  • Bind Disabled to a state key you set while another process runs.

Limitations

  • One On Click list per button; use Condition actions to branch.
  • Actions are not run in the editor canvas — use Preview.

Troubleshooting

My On Click actions do not run.

Why: Submits the surrounding form is on, so the click submits the form instead.

Fix: Turn the option off, or move the actions to the Form's On Submit / On Success.

The form is not submitted.

Why: The button is outside the Form component.

Fix: Move the button inside the Form (anywhere within it).

Related

Was this helpful?