Pressable
A labeled press target around one visual child.
Props
| Prop | Type | Required |
|---|---|---|
accessibilityHint | string | No |
enabled | boolean | No |
expanded | boolean | No |
itemValue | any | No |
label | string | Yes |
role | string | No |
selected | boolean | No |
semantics | string | No |
validationMessage | nullableString | No |
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.