Skip to content

Button

The Button element triggers an action when clicked. Three action types are available: submitting the form, navigating to a URL, or running a custom script.

Properties

Action

PropertyTypeDescription
typesubmit / url / scriptThe action performed when the button is clicked
labelstringButton label text
scriptstringJavaScript to execute — only used when type is script
urlstringURL to navigate to — only used when type is url
visibilitystringConditional expression — the button is hidden when this evaluates to falsy. See Visibility

Appearance

PropertyTypeDescription
colorstringColour token — primary, secondary, accent, positive, negative, warning, info, or a custom CSS colour
sizexs / sm / md / lg / xlButton size
densebooleanCompact/reduced-padding style
fullWidthbooleanStretch the button to fill the full column width
roundedbooleanPill-shaped corners
outlinedbooleanOutline-only style — no background fill
unelevatedbooleanRemove drop shadow
pushboolean3-D push-button style
glossybooleanAdd a glossy sheen overlay

Plus shared layout properties.

Action types

  • submit — validates the form and sends the submission to the server. The form's on_submit script runs before the request is sent.
  • url — navigates the browser to the configured URL. Useful for linking to an external resource or another page after the user has reviewed the form.
  • script — executes the JavaScript string in script in the context of the current form. Use for custom actions that don't fit the standard submit or navigate flows.

See also: Elements overview

S-Launch