Skip to content
  • Android
  • iOS
  • Web

Press

Make custom content respond to presses.

Engine API NPressnayan-ui/components

Live examples

Example.tsx

Attributes

NPress attributes
NameTypeDefaultDetails
childrenReactNode | ((state: NPressState) => ReactNode)Optional
onPress((event: GestureResponderEvent) => unknown)OptionalCalled after `onPressOut`.
isDisabledbooleanOptional
isSelectedbooleanOptionalRetained selection semantics for engine menu/list controls.
type"button" | "submit" | "reset"Optional
classNamestringOptional
styleNPressStyle | ((state: NPressState) => NPressStyle)Optional
accessibilityLabelstringOptionalOverrides 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
refRef<NPressRef>Optional

Tags