- Android
- iOS
- Web
Press
Make custom content respond to presses.
Engine API NPressnayan-ui/components
Example.tsx
| Name | Type | Default | Details |
|---|---|---|---|
| children | ReactNode | ((state: NPressState) => ReactNode) | Optional | |
| onPress | ((event: GestureResponderEvent) => unknown) | Optional | Called after `onPressOut`. |
| isDisabled | boolean | Optional | |
| isSelected | boolean | Optional | Retained selection semantics for engine menu/list controls. |
| type | "button" | "submit" | "reset" | Optional | |
| className | string | Optional | |
| style | NPressStyle | ((state: NPressState) => NPressStyle) | Optional | |
| accessibilityLabel | string | Optional | Overrides the text that's read by the screen reader when the user interacts with the element. By default, the label is constructed by traversing all the children and accumulating all the `Text` nodes separated by space. See https://reactnative.dev/docs/view#accessibilitylabel |
| ref | Ref<NPressRef> | Optional |