Skip to main content

Pressable

A labeled press target around one visual child.

Props​

PropTypeRequired
accessibilityHintstringNo
enabledbooleanNo
expandedbooleanNo
itemValueanyNo
labelstringYes
rolestringNo
selectedbooleanNo
semanticsstringNo
validationMessagenullableStringNo

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​

<Pressable label="Save" on-press="emit saved"><Text text="Save" /></Pressable>

Defaults, values, and validation​

Requires one child. role accepts button/link/tab/menuitem/radio. Keep the accessible target large enough even if a decorative child scales.

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