Skip to main content

Button

A native action control.

Props​

PropTypeRequired
accessibilityHintstringNo
enabledbooleanNo
labelstringNo
semanticsstringNo
titlestringYes

Types describe evaluated values. Literal native attributes use the declared decoder; use bind-* for expressions. any still has the semantic constraints listed below. Common document attributes (class, state, show, etc.) are separate from props.

Example​

<Button title="Continue" on-press="emit continued" />

Defaults, values, and validation​

title is required. enabled defaults to true. Button is a leaf; use Pressable for custom composed content.

Unknown props, wrong types, missing required props, and unsupported child structure fail validation. Use attributes for evaluated input and diagnostics for recovery.

Events​

on-press

Local commands​

No local commands.

Native primitive index · Events · Host APIs