Skip to content

Latest commit

 

History

History
51 lines (35 loc) · 1.33 KB

Button.md

File metadata and controls

51 lines (35 loc) · 1.33 KB

Button

A push button backed by a native button control.

<Button ... />

Overview

The optional action callback fires via target-action and receives the sender as its first argument. Make the most likely safe action primary; never make a destructive action primary. Prefer Link for navigation and Toggle for on/off state.

Topics

Properties

Name Type Required Description
title string required Button label. Use a precise verb.
action function optional Called with sender: function(btn) ... end.
style string optional "plain", "link", "primary", or "row".
systemImage string optional SF Symbol name shown beside the title.
size number optional Title font size; omit for system default.
weight string optional Title font weight.
disabled boolean optional Disables the control when true.
accessibilityLabel string optional VoiceOver label.

Example

<Button title="Save" action="save" />

Platform notes

  • AppKit NSButton (rounded) or LuaActionButton (compound). UIKit UIButton.

See Also


Source: lua/embedded/AppKit.lua:1196 (AppKit.Button)