Skip to content

Button

A clickable button that runs one of the built-in actions.

Display widgets · widget type button · binds through text templates in the action's parameters

Related: Nav Link · Parameter · Alert

Options

Option Values Default Description
Text Any text or template Button The button label
Icon An icon key None Shown before the label
Click action See below None What happens when the button is pressed
Button Style Theme variants Default Picks the button's look from the theme
Box Style Sizing and spacing — The box around the button

Click actions

Action What it does
None Nothing — a button with no behaviour yet
Open window Opens one of the portal's windows over the current page, optionally passing parameter values
Navigate to page Switches to another page in the portal by its route
Close window Closes the window the button sits in. Only meaningful on window content
Show toast Shows a themed notification with a title, a description and a timeout

Notes

  • Window parameters are expressions evaluated when the button is clicked, so {$data.selectedCustomerId} or, inside a table row, {$record.id} passes the current value
  • A window receives a snapshot: later changes on the page behind it do not reach the open window, and its own data sources run again each time it opens
  • Windows stack — opening one from inside another leaves the first underneath, and each closes on its own
  • Buttons do not open windows on the designer canvas; test the flow in the portal preview