React.Basic.Native
- Package
- purescript-react-basic-native
- Repository
- dwhitney/purescript-react-basic-native
Re-exports from React.Basic.Native.Generated
#WebViewProps Source
type WebViewProps = (accessibilityActions :: Array String, accessibilityComponentType :: String, accessibilityElementsHidden :: Boolean, accessibilityHint :: String, accessibilityIgnoresInvertColors :: Boolean, accessibilityLabel :: String, accessibilityLiveRegion :: String, accessibilityRole :: String, accessibilityStates :: Array String, accessibilityTraits :: Array String, accessibilityViewIsModal :: Boolean, accessible :: Boolean, allowFileAccess :: Boolean, allowsInlineMediaPlayback :: Boolean, automaticallyAdjustContentInsets :: Boolean, bounces :: Boolean, children :: Array JSX, collapsable :: Boolean, contentInset :: Insets, dataDetectorTypes :: Array String, decelerationRate :: String, domStorageEnabled :: Boolean, hasTVPreferredFocus :: Boolean, hitSlop :: Insets, html :: String, importantForAccessibility :: String, injectedJavaScript :: String, isTVSelectable :: Boolean, javaScriptEnabled :: Boolean, key :: String, mediaPlaybackRequiresUserAction :: Boolean, mixedContentMode :: String, nativeConfig :: WebViewNativeConfig, nativeID :: String, needsOffscreenAlphaCompositing :: Boolean, onAccessibilityAction :: Effect Unit, onAccessibilityTap :: Effect Unit, onError :: EffectFn1 NavState Unit, onLayout :: EffectFn1 LayoutChangeEvent Unit, onLoad :: EffectFn1 NavState Unit, onLoadEnd :: EffectFn1 NavState Unit, onLoadStart :: EffectFn1 NavState Unit, onMagicTap :: Effect Unit, onMessage :: EffectFn1 (NativeSyntheticEvent WebViewMessageEventData) Unit, onMoveShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onMoveShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onNavigationStateChange :: EffectFn1 NavState Unit, onResponderEnd :: EffectFn1 GestureResponderEvent Unit, onResponderGrant :: EffectFn1 GestureResponderEvent Unit, onResponderMove :: EffectFn1 GestureResponderEvent Unit, onResponderReject :: EffectFn1 GestureResponderEvent Unit, onResponderRelease :: EffectFn1 GestureResponderEvent Unit, onResponderStart :: EffectFn1 GestureResponderEvent Unit, onResponderTerminate :: EffectFn1 GestureResponderEvent Unit, onResponderTerminationRequest :: EffectFn1 GestureResponderEvent Boolean, onShouldStartLoadWithRequest :: EffectFn1 WebViewIOSLoadRequestEvent Boolean, onStartShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onTouchCancel :: EffectFn1 GestureResponderEvent Unit, onTouchEnd :: EffectFn1 GestureResponderEvent Unit, onTouchEndCapture :: EffectFn1 GestureResponderEvent Unit, onTouchMove :: EffectFn1 GestureResponderEvent Unit, onTouchStart :: EffectFn1 GestureResponderEvent Unit, originWhitelist :: Array String, pointerEvents :: String, removeClippedSubviews :: Boolean, renderError :: Effect JSX, renderLoading :: Effect JSX, renderToHardwareTextureAndroid :: Boolean, saveFormDataDisabled :: Boolean, scalesPageToFit :: Boolean, scrollEnabled :: Boolean, shouldRasterizeIOS :: Boolean, source :: Object Foreign, startInLoadingState :: Boolean, style :: CSS, testID :: String, tvParallaxMagnification :: Number, tvParallaxProperties :: { enabled :: Boolean, magnification :: Number, pressDelay :: Number, pressDuration :: Number, pressMagnification :: Number, shiftDistanceX :: Number, shiftDistanceY :: Number, tiltAngle :: Number }, tvParallaxShiftDistanceX :: Number, tvParallaxShiftDistanceY :: Number, tvParallaxTiltAngle :: Number, url :: String, useWebKit :: Boolean, userAgent :: String)see https://facebook.github.io/react-native/docs/webview.html#props
accessibilityActionsProvides an array of custom actions available for accessibility. platform iosaccessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibilityViewIsModalA Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.allowFileAccessSets whether the webview allows access to the file system.allowsInlineMediaPlaybackDetermines whether HTML5 videos play inline or use the native full-screen controller. default value false NOTE : "In order * for video to play inline, not only does this property need to be set to true, but the video element in the HTML document must also include the webkit-playsinline attribute."automaticallyAdjustContentInsetsControls whether to adjust the content inset for web views that are placed behind a navigation bar, tab bar, or toolbar. The default value istrue.bouncesBoolean value that determines whether the web view bounces when it reaches the edge of the content. The default value istrue. platform ioscollapsableViews that are only used to layout their children or otherwise don't draw anything may be automatically removed from the native hierarchy as an optimization. Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.contentInsetThe amount by which the web view content is inset from the edges of the scroll view. Defaults to {top: 0, left: 0, bottom: 0, right: 0}.dataDetectorTypesDetermines the types of data converted to clickable URLs in the web view’s content. By default only phone numbers are detected. You can provide one type or an array of many types. Possible values fordataDetectorTypesare: -'phoneNumber'-'link'-'address'-'calendarEvent'-'none'-'all'decelerationRateA floating-point number that determines how quickly the scroll view decelerates after the user lifts their finger. You may also use string shortcuts "normal" and "fast" which match the underlying iOS settings for UIScrollViewDecelerationRateNormal and UIScrollViewDecelerationRateFast respectively. - normal: 0.998 - fast: 0.99 (the default for iOS WebView)domStorageEnabledUsed on Android only, controls whether DOM Storage is enabled or not androidhasTVPreferredFocus(Apple TV only) May be set to true to force the Apple TV focus engine to move focus to this view. platform ioshitSlopThis defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets that are at least 30 - 40 points/density-independent pixels. If a Touchable view has a height of 20 the touchable height can be extended to 40 with hitSlop={{top: 10, bottom: 10, left: 0, right: 0}} NOTE The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.injectedJavaScriptSet this to provide JavaScript that will be injected into the web page when the view loads.isTVSelectable(Apple TV only) When set to true, this view will be focusable and navigable using the Apple TV remote. platform iosjavaScriptEnabledUsed for android only, JS is enabled by default for WebView on iOSmediaPlaybackRequiresUserActionDetermines whether HTML5 audio & videos require the user to tap before they can start playing. The default value is false.mixedContentModeSpecifies the mixed content mode. i.e WebView will allow a secure origin to load content from any other origin. Possible values for mixedContentMode are: 'never' (default) - WebView will not allow a secure origin to load content from an insecure origin. 'always' - WebView will allow a secure origin to load content from any other origin, even if that origin is insecure. 'compatibility' - WebView will attempt to be compatible with the approach of a modern web browser with regard to mixed content.nativeConfigOverride the native component used to render the WebView. Enables a custom native WebView which uses the same JavaScript as the original WebView.nativeIDUsed to reference react managed views from native code.needsOffscreenAlphaCompositingWhether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. The default (false) falls back to drawing the component and its children with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. This default may be noticeable and undesired in the case where the View you are setting an opacity on has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background). Rendering offscreen to preserve correct alpha behavior is extremely expensive and hard to debug for non-native developers, which is why it is not turned on by default. If you do need to enable this property for an animation, consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). If that property is enabled, this View will be rendered off-screen once, saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU.onAccessibilityActionWhenaccessibleis true, the system will try to invoke this function when the user performs an accessibility custom action. platform iosonAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonErrorInvoked when load failsonLayoutInvoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height}}}.onLoadInvoked when load finishonLoadEndInvoked when load either succeeds or failsonLoadStartInvoked on load startonMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonMessageInvoked when window.postMessage is called from WebView.onMoveShouldSetResponderCalled for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?onMoveShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onNavigationStateChangeFunction that is invoked when theWebViewloading starts or ends.onResponderEndIf the View returns true and attempts to become the responder, one of the following will happen:onResponderGrantThe View is now responding for touch events. This is the time to highlight and show the user what is happeningonResponderMoveIf the view is responding, the following handlers can be called: The user is moving their fingeronResponderRejectSomething else is the responder right now and will not release itonResponderReleaseFired at the end of the touch, ie "touchUp"onResponderTerminateThe responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationRequest, or might be taken by the OS without asking (happens with control center/ notification center on iOS)onResponderTerminationRequestSomething else wants to become responder. Should this view release the responder? Returning true allows releaseonShouldStartLoadWithRequestAllows custom handling of any webview requests by a JS handler. Return true or false from this method to continue loading the request.onStartShouldSetResponderA view can become the touch responder by implementing the correct negotiation methods. There are two methods to ask the view if it wants to become responder: Does this view want to become responder on the start of a touch?onStartShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.originWhitelistList of origin strings to allow being navigated to. The strings allow wildcards and get matched against just the origin (not the full URL). If the user taps to navigate to a new page but the new page is not in this whitelist, the URL will be handled by the OS. The default whitelisted origins are "http://" and "https://".pointerEventsIn the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class: .box-none { pointer-events: none; } .box-none * { pointer-events: all; } box-only is the equivalent of .box-only { pointer-events: all; } .box-only * { pointer-events: none; } But since pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform.removeClippedSubviewsThis is a special performance property exposed by RCTView and is useful for scrolling content when there are many subviews, most of which are offscreen. For this property to be effective, it must be applied to a view that contains many subviews that extend outside its bound. The subviews must also have overflow: hidden, as should the containing view (or one of its superviews).renderErrorFunction that returns a view to show if there's an error.renderLoadingFunction that returns a loading indicator.renderToHardwareTextureAndroidWhether this view should render itself (and all of its children) into a single hardware texture on the GPU. On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation.saveFormDataDisabledControls whether form autocomplete data should be savedscalesPageToFitsets whether the webpage scales to fit the view and the user can change the scalescrollEnabledBoolean value that determines whether scrolling is enabled in theWebView. The default value istrue.shouldRasterizeIOSWhether this view should be rendered as a bitmap before compositing. On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view and quickly composite it during each frame. Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. Test and measure when using this property.startInLoadingStateBoolean value that forces theWebViewto show the loading view on the first load.testIDUsed to locate this view in end-to-end tests.tvParallaxMagnification(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 1.0. platform iostvParallaxProperties(Apple TV only) Object with properties to control Apple TV parallax effects. platform iostvParallaxShiftDistanceX(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxShiftDistanceY(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxTiltAngle(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 0.05. platform iosuseWebKitIftrue, use WKWebView instead of UIWebView.userAgentSets the user-agent for the WebView.
#WebViewNativeConfig Source
type WebViewNativeConfig = { component :: Undefinable Foreign, props :: Undefinable (Object Foreign), viewManager :: Undefinable (Object Foreign) }#WebViewMessageEventData Source
type WebViewMessageEventData = { data :: String }#ViewabilityConfigCallbackPair Source
type ViewabilityConfigCallbackPair = { onViewableItemsChanged :: EffectFn1 { changed :: Array ViewToken, viewableItems :: Array ViewToken } Unit, viewabilityConfig :: ViewabilityConfig }#ViewabilityConfig Source
type ViewabilityConfig = { itemVisiblePercentThreshold :: Undefinable Number, minimumViewTime :: Undefinable Number, viewAreaCoveragePercentThreshold :: Undefinable Number, waitForInteraction :: Undefinable Boolean }#ViewProps Source
type ViewProps = (accessibilityActions :: Array String, accessibilityComponentType :: String, accessibilityElementsHidden :: Boolean, accessibilityHint :: String, accessibilityIgnoresInvertColors :: Boolean, accessibilityLabel :: String, accessibilityLiveRegion :: String, accessibilityRole :: String, accessibilityStates :: Array String, accessibilityTraits :: Array String, accessibilityViewIsModal :: Boolean, accessible :: Boolean, children :: Array JSX, collapsable :: Boolean, hasTVPreferredFocus :: Boolean, hitSlop :: Insets, importantForAccessibility :: String, isTVSelectable :: Boolean, key :: String, nativeID :: String, needsOffscreenAlphaCompositing :: Boolean, onAccessibilityAction :: Effect Unit, onAccessibilityTap :: Effect Unit, onLayout :: EffectFn1 LayoutChangeEvent Unit, onMagicTap :: Effect Unit, onMoveShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onMoveShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onResponderEnd :: EffectFn1 GestureResponderEvent Unit, onResponderGrant :: EffectFn1 GestureResponderEvent Unit, onResponderMove :: EffectFn1 GestureResponderEvent Unit, onResponderReject :: EffectFn1 GestureResponderEvent Unit, onResponderRelease :: EffectFn1 GestureResponderEvent Unit, onResponderStart :: EffectFn1 GestureResponderEvent Unit, onResponderTerminate :: EffectFn1 GestureResponderEvent Unit, onResponderTerminationRequest :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onTouchCancel :: EffectFn1 GestureResponderEvent Unit, onTouchEnd :: EffectFn1 GestureResponderEvent Unit, onTouchEndCapture :: EffectFn1 GestureResponderEvent Unit, onTouchMove :: EffectFn1 GestureResponderEvent Unit, onTouchStart :: EffectFn1 GestureResponderEvent Unit, pointerEvents :: String, removeClippedSubviews :: Boolean, renderToHardwareTextureAndroid :: Boolean, shouldRasterizeIOS :: Boolean, style :: CSS, testID :: String, tvParallaxMagnification :: Number, tvParallaxProperties :: { enabled :: Boolean, magnification :: Number, pressDelay :: Number, pressDuration :: Number, pressMagnification :: Number, shiftDistanceX :: Number, shiftDistanceY :: Number, tiltAngle :: Number }, tvParallaxShiftDistanceX :: Number, tvParallaxShiftDistanceY :: Number, tvParallaxTiltAngle :: Number)see https://facebook.github.io/react-native/docs/view.html#props
accessibilityActionsProvides an array of custom actions available for accessibility. platform iosaccessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibilityViewIsModalA Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.collapsableViews that are only used to layout their children or otherwise don't draw anything may be automatically removed from the native hierarchy as an optimization. Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.hasTVPreferredFocus(Apple TV only) May be set to true to force the Apple TV focus engine to move focus to this view. platform ioshitSlopThis defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets that are at least 30 - 40 points/density-independent pixels. If a Touchable view has a height of 20 the touchable height can be extended to 40 with hitSlop={{top: 10, bottom: 10, left: 0, right: 0}} NOTE The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.isTVSelectable(Apple TV only) When set to true, this view will be focusable and navigable using the Apple TV remote. platform iosnativeIDUsed to reference react managed views from native code.needsOffscreenAlphaCompositingWhether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. The default (false) falls back to drawing the component and its children with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. This default may be noticeable and undesired in the case where the View you are setting an opacity on has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background). Rendering offscreen to preserve correct alpha behavior is extremely expensive and hard to debug for non-native developers, which is why it is not turned on by default. If you do need to enable this property for an animation, consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). If that property is enabled, this View will be rendered off-screen once, saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU.onAccessibilityActionWhenaccessibleis true, the system will try to invoke this function when the user performs an accessibility custom action. platform iosonAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonLayoutInvoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height}}}.onMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonMoveShouldSetResponderCalled for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?onMoveShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onResponderEndIf the View returns true and attempts to become the responder, one of the following will happen:onResponderGrantThe View is now responding for touch events. This is the time to highlight and show the user what is happeningonResponderMoveIf the view is responding, the following handlers can be called: The user is moving their fingeronResponderRejectSomething else is the responder right now and will not release itonResponderReleaseFired at the end of the touch, ie "touchUp"onResponderTerminateThe responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationRequest, or might be taken by the OS without asking (happens with control center/ notification center on iOS)onResponderTerminationRequestSomething else wants to become responder. Should this view release the responder? Returning true allows releaseonStartShouldSetResponderA view can become the touch responder by implementing the correct negotiation methods. There are two methods to ask the view if it wants to become responder: Does this view want to become responder on the start of a touch?onStartShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.pointerEventsIn the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class: .box-none { pointer-events: none; } .box-none * { pointer-events: all; } box-only is the equivalent of .box-only { pointer-events: all; } .box-only * { pointer-events: none; } But since pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform.removeClippedSubviewsThis is a special performance property exposed by RCTView and is useful for scrolling content when there are many subviews, most of which are offscreen. For this property to be effective, it must be applied to a view that contains many subviews that extend outside its bound. The subviews must also have overflow: hidden, as should the containing view (or one of its superviews).renderToHardwareTextureAndroidWhether this view should render itself (and all of its children) into a single hardware texture on the GPU. On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation.shouldRasterizeIOSWhether this view should be rendered as a bitmap before compositing. On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view and quickly composite it during each frame. Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. Test and measure when using this property.testIDUsed to locate this view in end-to-end tests.tvParallaxMagnification(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 1.0. platform iostvParallaxProperties(Apple TV only) Object with properties to control Apple TV parallax effects. platform iostvParallaxShiftDistanceX(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxShiftDistanceY(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxTiltAngle(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 0.05. platform ios
#ViewPagerAndroidProps Source
type ViewPagerAndroidProps = (accessibilityActions :: Array String, accessibilityComponentType :: String, accessibilityElementsHidden :: Boolean, accessibilityHint :: String, accessibilityIgnoresInvertColors :: Boolean, accessibilityLabel :: String, accessibilityLiveRegion :: String, accessibilityRole :: String, accessibilityStates :: Array String, accessibilityTraits :: Array String, accessibilityViewIsModal :: Boolean, accessible :: Boolean, children :: Array JSX, collapsable :: Boolean, hasTVPreferredFocus :: Boolean, hitSlop :: Insets, importantForAccessibility :: String, initialPage :: Number, isTVSelectable :: Boolean, key :: String, keyboardDismissMode :: String, nativeID :: String, needsOffscreenAlphaCompositing :: Boolean, onAccessibilityAction :: Effect Unit, onAccessibilityTap :: Effect Unit, onLayout :: EffectFn1 LayoutChangeEvent Unit, onMagicTap :: Effect Unit, onMoveShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onMoveShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onPageScroll :: EffectFn1 (NativeSyntheticEvent ViewPagerAndroidOnPageScrollEventData) Unit, onPageScrollStateChanged :: EffectFn1 String Unit, onPageSelected :: EffectFn1 (NativeSyntheticEvent ViewPagerAndroidOnPageSelectedEventData) Unit, onResponderEnd :: EffectFn1 GestureResponderEvent Unit, onResponderGrant :: EffectFn1 GestureResponderEvent Unit, onResponderMove :: EffectFn1 GestureResponderEvent Unit, onResponderReject :: EffectFn1 GestureResponderEvent Unit, onResponderRelease :: EffectFn1 GestureResponderEvent Unit, onResponderStart :: EffectFn1 GestureResponderEvent Unit, onResponderTerminate :: EffectFn1 GestureResponderEvent Unit, onResponderTerminationRequest :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onTouchCancel :: EffectFn1 GestureResponderEvent Unit, onTouchEnd :: EffectFn1 GestureResponderEvent Unit, onTouchEndCapture :: EffectFn1 GestureResponderEvent Unit, onTouchMove :: EffectFn1 GestureResponderEvent Unit, onTouchStart :: EffectFn1 GestureResponderEvent Unit, pageMargin :: Number, pointerEvents :: String, removeClippedSubviews :: Boolean, renderToHardwareTextureAndroid :: Boolean, scrollEnabled :: Boolean, shouldRasterizeIOS :: Boolean, style :: CSS, testID :: String, tvParallaxMagnification :: Number, tvParallaxProperties :: { enabled :: Boolean, magnification :: Number, pressDelay :: Number, pressDuration :: Number, pressMagnification :: Number, shiftDistanceX :: Number, shiftDistanceY :: Number, tiltAngle :: Number }, tvParallaxShiftDistanceX :: Number, tvParallaxShiftDistanceY :: Number, tvParallaxTiltAngle :: Number)accessibilityActionsProvides an array of custom actions available for accessibility. platform iosaccessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibilityViewIsModalA Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.collapsableViews that are only used to layout their children or otherwise don't draw anything may be automatically removed from the native hierarchy as an optimization. Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.hasTVPreferredFocus(Apple TV only) May be set to true to force the Apple TV focus engine to move focus to this view. platform ioshitSlopThis defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets that are at least 30 - 40 points/density-independent pixels. If a Touchable view has a height of 20 the touchable height can be extended to 40 with hitSlop={{top: 10, bottom: 10, left: 0, right: 0}} NOTE The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.initialPageIndex of initial page that should be selected. UsesetPagemethod to update the page, andonPageSelectedto monitor page changesisTVSelectable(Apple TV only) When set to true, this view will be focusable and navigable using the Apple TV remote. platform ioskeyboardDismissModeDetermines whether the keyboard gets dismissed in response to a drag. - 'none' (the default), drags do not dismiss the keyboard. - 'on-drag', the keyboard is dismissed when a drag begins.nativeIDUsed to reference react managed views from native code.needsOffscreenAlphaCompositingWhether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. The default (false) falls back to drawing the component and its children with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. This default may be noticeable and undesired in the case where the View you are setting an opacity on has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background). Rendering offscreen to preserve correct alpha behavior is extremely expensive and hard to debug for non-native developers, which is why it is not turned on by default. If you do need to enable this property for an animation, consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). If that property is enabled, this View will be rendered off-screen once, saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU.onAccessibilityActionWhenaccessibleis true, the system will try to invoke this function when the user performs an accessibility custom action. platform iosonAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonLayoutInvoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height}}}.onMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonMoveShouldSetResponderCalled for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?onMoveShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onPageScrollExecuted when transitioning between pages (ether because of animation for the requested page change or when user is swiping/dragging between pages) Theevent.nativeEventobject for this callback will carry following data: - position - index of first page from the left that is currently visible - offset - value from range [0,1) describing stage between page transitions. Value x means that (1 - x) fraction of the page at "position" index is visible, and x fraction of the next page is visible.onPageScrollStateChangedFunction called when the page scrolling state has changed. The page scrolling state can be in 3 states: - idle, meaning there is no interaction with the page scroller happening at the time - dragging, meaning there is currently an interaction with the page scroller - settling, meaning that there was an interaction with the page scroller, and the page scroller is now finishing it's closing or opening animationonPageSelectedThis callback will be called once ViewPager finish navigating to selected page (when user swipes between pages). Theevent.nativeEventobject passed to this callback will have following fields: - position - index of page that has been selectedonResponderEndIf the View returns true and attempts to become the responder, one of the following will happen:onResponderGrantThe View is now responding for touch events. This is the time to highlight and show the user what is happeningonResponderMoveIf the view is responding, the following handlers can be called: The user is moving their fingeronResponderRejectSomething else is the responder right now and will not release itonResponderReleaseFired at the end of the touch, ie "touchUp"onResponderTerminateThe responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationRequest, or might be taken by the OS without asking (happens with control center/ notification center on iOS)onResponderTerminationRequestSomething else wants to become responder. Should this view release the responder? Returning true allows releaseonStartShouldSetResponderA view can become the touch responder by implementing the correct negotiation methods. There are two methods to ask the view if it wants to become responder: Does this view want to become responder on the start of a touch?onStartShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.pageMarginBlank space to show between pages. This is only visible while scrolling, pages are still edge-to-edge.pointerEventsIn the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class: .box-none { pointer-events: none; } .box-none * { pointer-events: all; } box-only is the equivalent of .box-only { pointer-events: all; } .box-only * { pointer-events: none; } But since pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform.removeClippedSubviewsThis is a special performance property exposed by RCTView and is useful for scrolling content when there are many subviews, most of which are offscreen. For this property to be effective, it must be applied to a view that contains many subviews that extend outside its bound. The subviews must also have overflow: hidden, as should the containing view (or one of its superviews).renderToHardwareTextureAndroidWhether this view should render itself (and all of its children) into a single hardware texture on the GPU. On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation.scrollEnabledWhen false, the content does not scroll. The default value is true.shouldRasterizeIOSWhether this view should be rendered as a bitmap before compositing. On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view and quickly composite it during each frame. Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. Test and measure when using this property.testIDUsed to locate this view in end-to-end tests.tvParallaxMagnification(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 1.0. platform iostvParallaxProperties(Apple TV only) Object with properties to control Apple TV parallax effects. platform iostvParallaxShiftDistanceX(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxShiftDistanceY(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxTiltAngle(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 0.05. platform ios
#ViewPagerAndroidOnPageSelectedEventData Source
type ViewPagerAndroidOnPageSelectedEventData = { position :: Number }#ViewPagerAndroidOnPageScrollEventData Source
type ViewPagerAndroidOnPageScrollEventData = { offset :: Number, position :: Number }#TouchableWithoutFeedbackProps Source
type TouchableWithoutFeedbackProps = (accessibilityComponentType :: String, accessibilityElementsHidden :: Boolean, accessibilityHint :: String, accessibilityIgnoresInvertColors :: Boolean, accessibilityLabel :: String, accessibilityLiveRegion :: String, accessibilityRole :: String, accessibilityStates :: Array String, accessibilityTraits :: Array String, accessible :: Boolean, children :: Array JSX, delayLongPress :: Number, delayPressIn :: Number, delayPressOut :: Number, disabled :: Boolean, hasTVPreferredFocus :: Boolean, hitSlop :: Insets, importantForAccessibility :: String, key :: String, onAccessibilityTap :: Effect Unit, onBlur :: EffectFn1 (NativeSyntheticEvent TargetedEvent) Unit, onFocus :: EffectFn1 (NativeSyntheticEvent TargetedEvent) Unit, onLayout :: EffectFn1 LayoutChangeEvent Unit, onLongPress :: EffectFn1 GestureResponderEvent Unit, onMagicTap :: Effect Unit, onPress :: EffectFn1 GestureResponderEvent Unit, onPressIn :: EffectFn1 GestureResponderEvent Unit, onPressOut :: EffectFn1 GestureResponderEvent Unit, pressRetentionOffset :: Insets, style :: CSS, testID :: String, tvParallaxProperties :: { enabled :: Boolean, magnification :: Number, pressDelay :: Number, pressDuration :: Number, pressMagnification :: Number, shiftDistanceX :: Number, shiftDistanceY :: Number, tiltAngle :: Number })see https://facebook.github.io/react-native/docs/touchablewithoutfeedback.html#props
accessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.delayLongPressDelay in ms, from onPressIn, before onLongPress is called.delayPressInDelay in ms, from the start of the touch, before onPressIn is called.delayPressOutDelay in ms, from the release of the touch, before onPressOut is called.disabledIf true, disable all interactions for this component.hasTVPreferredFocus(Apple TV only) TV preferred focus (see documentation for the View component). platform ioshitSlopThis defines how far your touch can start away from the button. This is added to pressRetentionOffset when moving off of the button. NOTE The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.onAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonBlurWhenaccessibleis true (which is the default) this may be called when the OS-specific concept of "blur" occurs, meaning the element lost focus. Some platforms may not have the concept of blur.onFocusWhenaccessibleis true (which is the default) this may be called when the OS-specific concept of "focus" occurs. Some platforms may not have the concept of focus.onLayoutInvoked on mount and layout changes with {nativeEvent: {layout: {x, y, width, height}}}onMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonPressCalled when the touch is released, but not if cancelled (e.g. by a scroll that steals the responder lock).pressRetentionOffsetWhen the scroll view is disabled, this defines how far your touch may move off of the button, before deactivating the button. Once deactivated, try moving it back and you'll see that the button is once again reactivated! Move it back and forth several times while the scroll view is disabled. Ensure you pass in a constant to reduce memory allocations.style//FIXME: not in doc but available in examplestestIDUsed to locate this view in end-to-end tests.tvParallaxProperties(Apple TV only) Object with properties to control Apple TV parallax effects. enabled: If true, parallax effects are enabled. Defaults to true. shiftDistanceX: Defaults to 2.0. shiftDistanceY: Defaults to 2.0. tiltAngle: Defaults to 0.05. magnification: Defaults to 1.0. pressMagnification: Defaults to 1.0. pressDuration: Defaults to 0.3. pressDelay: Defaults to 0.0. platform ios
#TouchableOpacityProps Source
type TouchableOpacityProps = (accessibilityComponentType :: String, accessibilityElementsHidden :: Boolean, accessibilityHint :: String, accessibilityIgnoresInvertColors :: Boolean, accessibilityLabel :: String, accessibilityLiveRegion :: String, accessibilityRole :: String, accessibilityStates :: Array String, accessibilityTraits :: Array String, accessible :: Boolean, activeOpacity :: Number, children :: Array JSX, delayLongPress :: Number, delayPressIn :: Number, delayPressOut :: Number, disabled :: Boolean, hasTVPreferredFocus :: Boolean, hitSlop :: Insets, importantForAccessibility :: String, key :: String, onAccessibilityTap :: Effect Unit, onBlur :: EffectFn1 (NativeSyntheticEvent TargetedEvent) Unit, onFocus :: EffectFn1 (NativeSyntheticEvent TargetedEvent) Unit, onLayout :: EffectFn1 LayoutChangeEvent Unit, onLongPress :: EffectFn1 GestureResponderEvent Unit, onMagicTap :: Effect Unit, onPress :: EffectFn1 GestureResponderEvent Unit, onPressIn :: EffectFn1 GestureResponderEvent Unit, onPressOut :: EffectFn1 GestureResponderEvent Unit, pressRetentionOffset :: Insets, style :: CSS, testID :: String, tvParallaxProperties :: { enabled :: Boolean, magnification :: Number, pressDelay :: Number, pressDuration :: Number, pressMagnification :: Number, shiftDistanceX :: Number, shiftDistanceY :: Number, tiltAngle :: Number })see https://facebook.github.io/react-native/docs/touchableopacity.html#props
accessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.activeOpacityDetermines what the opacity of the wrapped view should be when touch is active. Defaults to 0.2delayLongPressDelay in ms, from onPressIn, before onLongPress is called.delayPressInDelay in ms, from the start of the touch, before onPressIn is called.delayPressOutDelay in ms, from the release of the touch, before onPressOut is called.disabledIf true, disable all interactions for this component.hasTVPreferredFocus(Apple TV only) TV preferred focus (see documentation for the View component). platform ioshitSlopThis defines how far your touch can start away from the button. This is added to pressRetentionOffset when moving off of the button. NOTE The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.onAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonBlurWhenaccessibleis true (which is the default) this may be called when the OS-specific concept of "blur" occurs, meaning the element lost focus. Some platforms may not have the concept of blur.onFocusWhenaccessibleis true (which is the default) this may be called when the OS-specific concept of "focus" occurs. Some platforms may not have the concept of focus.onLayoutInvoked on mount and layout changes with {nativeEvent: {layout: {x, y, width, height}}}onMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonPressCalled when the touch is released, but not if cancelled (e.g. by a scroll that steals the responder lock).pressRetentionOffsetWhen the scroll view is disabled, this defines how far your touch may move off of the button, before deactivating the button. Once deactivated, try moving it back and you'll see that the button is once again reactivated! Move it back and forth several times while the scroll view is disabled. Ensure you pass in a constant to reduce memory allocations.style//FIXME: not in doc but available in examplestestIDUsed to locate this view in end-to-end tests.tvParallaxProperties(Apple TV only) Object with properties to control Apple TV parallax effects. enabled: If true, parallax effects are enabled. Defaults to true. shiftDistanceX: Defaults to 2.0. shiftDistanceY: Defaults to 2.0. tiltAngle: Defaults to 0.05. magnification: Defaults to 1.0. pressMagnification: Defaults to 1.0. pressDuration: Defaults to 0.3. pressDelay: Defaults to 0.0. platform ios
#TouchableNativeFeedbackProps Source
type TouchableNativeFeedbackProps = (accessibilityComponentType :: String, accessibilityElementsHidden :: Boolean, accessibilityHint :: String, accessibilityIgnoresInvertColors :: Boolean, accessibilityLabel :: String, accessibilityLiveRegion :: String, accessibilityRole :: String, accessibilityStates :: Array String, accessibilityTraits :: Array String, accessible :: Boolean, background :: Object Foreign, children :: Array JSX, delayLongPress :: Number, delayPressIn :: Number, delayPressOut :: Number, disabled :: Boolean, hasTVPreferredFocus :: Boolean, hitSlop :: Insets, importantForAccessibility :: String, key :: String, onAccessibilityTap :: Effect Unit, onBlur :: EffectFn1 (NativeSyntheticEvent TargetedEvent) Unit, onFocus :: EffectFn1 (NativeSyntheticEvent TargetedEvent) Unit, onLayout :: EffectFn1 LayoutChangeEvent Unit, onLongPress :: EffectFn1 GestureResponderEvent Unit, onMagicTap :: Effect Unit, onPress :: EffectFn1 GestureResponderEvent Unit, onPressIn :: EffectFn1 GestureResponderEvent Unit, onPressOut :: EffectFn1 GestureResponderEvent Unit, pressRetentionOffset :: Insets, style :: CSS, testID :: String, tvParallaxProperties :: { enabled :: Boolean, magnification :: Number, pressDelay :: Number, pressDuration :: Number, pressMagnification :: Number, shiftDistanceX :: Number, shiftDistanceY :: Number, tiltAngle :: Number }, useForeground :: Boolean)see https://facebook.github.io/react-native/docs/touchableopacity.html#props
accessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.backgroundDetermines the type of background drawable that's going to be used to display feedback. It takes an object with type property and extra data depending on the type. It's recommended to use one of the following static methods to generate that dictionary: 1) TouchableNativeFeedback.SelectableBackground() - will create object that represents android theme's default background for selectable elements (?android:attr/selectableItemBackground) 2) TouchableNativeFeedback.SelectableBackgroundBorderless() - will create object that represent android theme's default background for borderless selectable elements (?android:attr/selectableItemBackgroundBorderless). Available on android API level 21+ 3) TouchableNativeFeedback.Ripple(color, borderless) - will create object that represents ripple drawable with specified color (as a string). If property borderless evaluates to true the ripple will render outside of the view bounds (see native actionbar buttons as an example of that behavior). This background type is available on Android API level 21+delayLongPressDelay in ms, from onPressIn, before onLongPress is called.delayPressInDelay in ms, from the start of the touch, before onPressIn is called.delayPressOutDelay in ms, from the release of the touch, before onPressOut is called.disabledIf true, disable all interactions for this component.hasTVPreferredFocus(Apple TV only) TV preferred focus (see documentation for the View component). platform ioshitSlopThis defines how far your touch can start away from the button. This is added to pressRetentionOffset when moving off of the button. NOTE The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.onAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonBlurWhenaccessibleis true (which is the default) this may be called when the OS-specific concept of "blur" occurs, meaning the element lost focus. Some platforms may not have the concept of blur.onFocusWhenaccessibleis true (which is the default) this may be called when the OS-specific concept of "focus" occurs. Some platforms may not have the concept of focus.onLayoutInvoked on mount and layout changes with {nativeEvent: {layout: {x, y, width, height}}}onMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonPressCalled when the touch is released, but not if cancelled (e.g. by a scroll that steals the responder lock).pressRetentionOffsetWhen the scroll view is disabled, this defines how far your touch may move off of the button, before deactivating the button. Once deactivated, try moving it back and you'll see that the button is once again reactivated! Move it back and forth several times while the scroll view is disabled. Ensure you pass in a constant to reduce memory allocations.style//FIXME: not in doc but available in examplestestIDUsed to locate this view in end-to-end tests.tvParallaxProperties(Apple TV only) Object with properties to control Apple TV parallax effects. enabled: If true, parallax effects are enabled. Defaults to true. shiftDistanceX: Defaults to 2.0. shiftDistanceY: Defaults to 2.0. tiltAngle: Defaults to 0.05. magnification: Defaults to 1.0. pressMagnification: Defaults to 1.0. pressDuration: Defaults to 0.3. pressDelay: Defaults to 0.0. platform ios
#TouchableHighlightProps Source
type TouchableHighlightProps = (accessibilityComponentType :: String, accessibilityElementsHidden :: Boolean, accessibilityHint :: String, accessibilityIgnoresInvertColors :: Boolean, accessibilityLabel :: String, accessibilityLiveRegion :: String, accessibilityRole :: String, accessibilityStates :: Array String, accessibilityTraits :: Array String, accessible :: Boolean, activeOpacity :: Number, children :: Array JSX, delayLongPress :: Number, delayPressIn :: Number, delayPressOut :: Number, disabled :: Boolean, hasTVPreferredFocus :: Boolean, hitSlop :: Insets, importantForAccessibility :: String, key :: String, onAccessibilityTap :: Effect Unit, onBlur :: EffectFn1 (NativeSyntheticEvent TargetedEvent) Unit, onFocus :: EffectFn1 (NativeSyntheticEvent TargetedEvent) Unit, onHideUnderlay :: Effect Unit, onLayout :: EffectFn1 LayoutChangeEvent Unit, onLongPress :: EffectFn1 GestureResponderEvent Unit, onMagicTap :: Effect Unit, onPress :: EffectFn1 GestureResponderEvent Unit, onPressIn :: EffectFn1 GestureResponderEvent Unit, onPressOut :: EffectFn1 GestureResponderEvent Unit, onShowUnderlay :: Effect Unit, pressRetentionOffset :: Insets, style :: CSS, testID :: String, tvParallaxProperties :: { enabled :: Boolean, magnification :: Number, pressDelay :: Number, pressDuration :: Number, pressMagnification :: Number, shiftDistanceX :: Number, shiftDistanceY :: Number, tiltAngle :: Number }, underlayColor :: String)see https://facebook.github.io/react-native/docs/touchablehighlight.html#props
accessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.activeOpacityDetermines what the opacity of the wrapped view should be when touch is active.delayLongPressDelay in ms, from onPressIn, before onLongPress is called.delayPressInDelay in ms, from the start of the touch, before onPressIn is called.delayPressOutDelay in ms, from the release of the touch, before onPressOut is called.disabledIf true, disable all interactions for this component.hasTVPreferredFocus(Apple TV only) TV preferred focus (see documentation for the View component). platform ioshitSlopThis defines how far your touch can start away from the button. This is added to pressRetentionOffset when moving off of the button. NOTE The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.onAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonBlurWhenaccessibleis true (which is the default) this may be called when the OS-specific concept of "blur" occurs, meaning the element lost focus. Some platforms may not have the concept of blur.onFocusWhenaccessibleis true (which is the default) this may be called when the OS-specific concept of "focus" occurs. Some platforms may not have the concept of focus.onHideUnderlayCalled immediately after the underlay is hiddenonLayoutInvoked on mount and layout changes with {nativeEvent: {layout: {x, y, width, height}}}onMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonPressCalled when the touch is released, but not if cancelled (e.g. by a scroll that steals the responder lock).onShowUnderlayCalled immediately after the underlay is shownpressRetentionOffsetWhen the scroll view is disabled, this defines how far your touch may move off of the button, before deactivating the button. Once deactivated, try moving it back and you'll see that the button is once again reactivated! Move it back and forth several times while the scroll view is disabled. Ensure you pass in a constant to reduce memory allocations.stylesee https://facebook.github.io/react-native/docs/view.html#styletestIDUsed to locate this view in end-to-end tests.tvParallaxProperties(Apple TV only) Object with properties to control Apple TV parallax effects. enabled: If true, parallax effects are enabled. Defaults to true. shiftDistanceX: Defaults to 2.0. shiftDistanceY: Defaults to 2.0. tiltAngle: Defaults to 0.05. magnification: Defaults to 1.0. pressMagnification: Defaults to 1.0. pressDuration: Defaults to 0.3. pressDelay: Defaults to 0.0. platform iosunderlayColorThe color of the underlay that will show through when the touch is active.
#ToolbarAndroidProps Source
type ToolbarAndroidProps = (accessibilityActions :: Array String, accessibilityComponentType :: String, accessibilityElementsHidden :: Boolean, accessibilityHint :: String, accessibilityIgnoresInvertColors :: Boolean, accessibilityLabel :: String, accessibilityLiveRegion :: String, accessibilityRole :: String, accessibilityStates :: Array String, accessibilityTraits :: Array String, accessibilityViewIsModal :: Boolean, accessible :: Boolean, actions :: Array { icon :: ImageURISource, show :: String, showWithText :: Boolean, title :: String }, children :: Array JSX, collapsable :: Boolean, contentInsetEnd :: Number, contentInsetStart :: Number, hasTVPreferredFocus :: Boolean, hitSlop :: Insets, importantForAccessibility :: String, isTVSelectable :: Boolean, key :: String, logo :: ImageURISource, nativeID :: String, navIcon :: ImageURISource, needsOffscreenAlphaCompositing :: Boolean, onAccessibilityAction :: Effect Unit, onAccessibilityTap :: Effect Unit, onActionSelected :: EffectFn1 Number Unit, onIconClicked :: Effect Unit, onLayout :: EffectFn1 LayoutChangeEvent Unit, onMagicTap :: Effect Unit, onMoveShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onMoveShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onResponderEnd :: EffectFn1 GestureResponderEvent Unit, onResponderGrant :: EffectFn1 GestureResponderEvent Unit, onResponderMove :: EffectFn1 GestureResponderEvent Unit, onResponderReject :: EffectFn1 GestureResponderEvent Unit, onResponderRelease :: EffectFn1 GestureResponderEvent Unit, onResponderStart :: EffectFn1 GestureResponderEvent Unit, onResponderTerminate :: EffectFn1 GestureResponderEvent Unit, onResponderTerminationRequest :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onTouchCancel :: EffectFn1 GestureResponderEvent Unit, onTouchEnd :: EffectFn1 GestureResponderEvent Unit, onTouchEndCapture :: EffectFn1 GestureResponderEvent Unit, onTouchMove :: EffectFn1 GestureResponderEvent Unit, onTouchStart :: EffectFn1 GestureResponderEvent Unit, overflowIcon :: ImageURISource, pointerEvents :: String, removeClippedSubviews :: Boolean, renderToHardwareTextureAndroid :: Boolean, rtl :: Boolean, shouldRasterizeIOS :: Boolean, style :: CSS, subtitle :: String, subtitleColor :: String, testID :: String, title :: String, titleColor :: String, tvParallaxMagnification :: Number, tvParallaxProperties :: { enabled :: Boolean, magnification :: Number, pressDelay :: Number, pressDuration :: Number, pressMagnification :: Number, shiftDistanceX :: Number, shiftDistanceY :: Number, tiltAngle :: Number }, tvParallaxShiftDistanceX :: Number, tvParallaxShiftDistanceY :: Number, tvParallaxTiltAngle :: Number)accessibilityActionsProvides an array of custom actions available for accessibility. platform iosaccessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibilityViewIsModalA Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.actionsSets possible actions on the toolbar as part of the action menu. These are displayed as icons or text on the right side of the widget. If they don't fit they are placed in an 'overflow' menu. This property takes an array of objects, where each object has the following keys: *title: required, the title of this action *icon: the icon for this action, e.g.require('./some_icon.png')*show: when to show this action as an icon or hide it in the overflow menu:always,ifRoomornever*showWithText: boolean, whether to show text alongside the icon or notcollapsableViews that are only used to layout their children or otherwise don't draw anything may be automatically removed from the native hierarchy as an optimization. Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.contentInsetEndSets the content inset for the toolbar ending edge. The content inset affects the valid area for Toolbar content other than the navigation button and menu. Insets define the minimum margin for these components and can be used to effectively align Toolbar content along well-known gridlines.contentInsetStartSets the content inset for the toolbar starting edge. The content inset affects the valid area for Toolbar content other than the navigation button and menu. Insets define the minimum margin for these components and can be used to effectively align Toolbar content along well-known gridlines.hasTVPreferredFocus(Apple TV only) May be set to true to force the Apple TV focus engine to move focus to this view. platform ioshitSlopThis defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets that are at least 30 - 40 points/density-independent pixels. If a Touchable view has a height of 20 the touchable height can be extended to 40 with hitSlop={{top: 10, bottom: 10, left: 0, right: 0}} NOTE The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.isTVSelectable(Apple TV only) When set to true, this view will be focusable and navigable using the Apple TV remote. platform ioslogoSets the toolbar logo.nativeIDUsed to reference react managed views from native code.navIconSets the navigation icon.needsOffscreenAlphaCompositingWhether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. The default (false) falls back to drawing the component and its children with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. This default may be noticeable and undesired in the case where the View you are setting an opacity on has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background). Rendering offscreen to preserve correct alpha behavior is extremely expensive and hard to debug for non-native developers, which is why it is not turned on by default. If you do need to enable this property for an animation, consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). If that property is enabled, this View will be rendered off-screen once, saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU.onAccessibilityActionWhenaccessibleis true, the system will try to invoke this function when the user performs an accessibility custom action. platform iosonAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonActionSelectedCallback that is called when an action is selected. The only argument that is passed to the callback is the position of the action in the actions array.onIconClickedCallback called when the icon is selected.onLayoutInvoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height}}}.onMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonMoveShouldSetResponderCalled for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?onMoveShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onResponderEndIf the View returns true and attempts to become the responder, one of the following will happen:onResponderGrantThe View is now responding for touch events. This is the time to highlight and show the user what is happeningonResponderMoveIf the view is responding, the following handlers can be called: The user is moving their fingeronResponderRejectSomething else is the responder right now and will not release itonResponderReleaseFired at the end of the touch, ie "touchUp"onResponderTerminateThe responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationRequest, or might be taken by the OS without asking (happens with control center/ notification center on iOS)onResponderTerminationRequestSomething else wants to become responder. Should this view release the responder? Returning true allows releaseonStartShouldSetResponderA view can become the touch responder by implementing the correct negotiation methods. There are two methods to ask the view if it wants to become responder: Does this view want to become responder on the start of a touch?onStartShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.overflowIconSets the overflow icon.pointerEventsIn the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class: .box-none { pointer-events: none; } .box-none * { pointer-events: all; } box-only is the equivalent of .box-only { pointer-events: all; } .box-only * { pointer-events: none; } But since pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform.removeClippedSubviewsThis is a special performance property exposed by RCTView and is useful for scrolling content when there are many subviews, most of which are offscreen. For this property to be effective, it must be applied to a view that contains many subviews that extend outside its bound. The subviews must also have overflow: hidden, as should the containing view (or one of its superviews).renderToHardwareTextureAndroidWhether this view should render itself (and all of its children) into a single hardware texture on the GPU. On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation.rtlUsed to set the toolbar direction to RTL. In addition to this property you need to add android:supportsRtl="true" to your application AndroidManifest.xml and then call setLayoutDirection(LayoutDirection.RTL) in your MainActivity onCreate method.shouldRasterizeIOSWhether this view should be rendered as a bitmap before compositing. On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view and quickly composite it during each frame. Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. Test and measure when using this property.subtitleSets the toolbar subtitle.subtitleColorSets the toolbar subtitle color.testIDUsed to locate this view in end-to-end tests.titleSets the toolbar title.titleColorSets the toolbar title color.tvParallaxMagnification(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 1.0. platform iostvParallaxProperties(Apple TV only) Object with properties to control Apple TV parallax effects. platform iostvParallaxShiftDistanceX(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxShiftDistanceY(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxTiltAngle(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 0.05. platform ios
#TextProps Source
type TextProps = (accessibilityComponentType :: String, accessibilityElementsHidden :: Boolean, accessibilityHint :: String, accessibilityIgnoresInvertColors :: Boolean, accessibilityLabel :: String, accessibilityLiveRegion :: String, accessibilityRole :: String, accessibilityStates :: Array String, accessibilityTraits :: Array String, accessible :: Boolean, adjustsFontSizeToFit :: Boolean, allowFontScaling :: Boolean, children :: Array JSX, ellipsizeMode :: String, importantForAccessibility :: String, key :: String, lineBreakMode :: String, maxFontSizeMultiplier :: String, minimumFontScale :: Number, nativeID :: String, numberOfLines :: Number, onAccessibilityTap :: Effect Unit, onLayout :: EffectFn1 LayoutChangeEvent Unit, onLongPress :: EffectFn1 GestureResponderEvent Unit, onMagicTap :: Effect Unit, onPress :: EffectFn1 GestureResponderEvent Unit, selectable :: Boolean, selectionColor :: String, style :: CSS, suppressHighlighting :: Boolean, testID :: String, textBreakStrategy :: String)accessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.adjustsFontSizeToFitSpecifies whether font should be scaled down automatically to fit given style constraints.allowFontScalingSpecifies whether fonts should scale to respect Text Size accessibility settings. The default istrue.ellipsizeModeThis can be one of the following values: -head- The line is displayed so that the end fits in the container and the missing text at the beginning of the line is indicated by an ellipsis glyph. e.g., "...wxyz" -middle- The line is displayed so that the beginning and end fit in the container and the missing text in the middle is indicated by an ellipsis glyph. "ab...yz" -tail- The line is displayed so that the beginning fits in the container and the missing text at the end of the line is indicated by an ellipsis glyph. e.g., "abcd..." -clip- Lines are not drawn past the edge of the text container. The default istail.numberOfLinesmust be set in conjunction with this prop. >clipis working only for iOSimportantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.lineBreakModeLine Break mode. Works only with numberOfLines. clip is working only for iOSmaxFontSizeMultiplierSpecifies largest possible scale a font can reach when allowFontScaling is enabled. Possible values: - null/undefined (default): inherit from the parent node or the global default (0) - 0: no max, ignore parent/global default - >= 1: sets the maxFontSizeMultiplier of this node to this valueminimumFontScaleSpecifies smallest possible scale a font can reach when adjustsFontSizeToFit is enabled. (values 0.01-1.0).nativeIDUsed to reference react managed views from native code.numberOfLinesUsed to truncate the text with an ellipsis after computing the text layout, including line wrapping, such that the total number of lines does not exceed this number. This prop is commonly used withellipsizeMode.onAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonLayoutInvoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height}}}.onLongPressThis function is called on long press. e.g., `onLongPress={this.increaseSize}>`` *onMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonPressThis function is called on press. Text intrinsically supports press handling with a default highlight state (which can be disabled with suppressHighlighting).selectableLets the user select text, to use the native copy and paste functionality.selectionColorThe highlight color of the text.stylesee https://facebook.github.io/react-native/docs/text.html#stylesuppressHighlightingWhentrue, no visual change is made when text is pressed down. By default, a gray oval highlights the text on press down.testIDUsed to locate this view in end-to-end tests.textBreakStrategySet text break strategy on Android API Level 23+ default ishighQuality.
#TextInputSubmitEditingEventData Source
type TextInputSubmitEditingEventData = { text :: String }#TextInputSelectionChangeEventData Source
type TextInputSelectionChangeEventData = { selection :: { end :: Number, start :: Number }, target :: Number }#TextInputScrollEventData Source
type TextInputScrollEventData = { contentOffset :: { x :: Number, y :: Number } }#TextInputProps Source
type TextInputProps = (accessibilityActions :: Array String, accessibilityComponentType :: String, accessibilityElementsHidden :: Boolean, accessibilityHint :: String, accessibilityIgnoresInvertColors :: Boolean, accessibilityLabel :: String, accessibilityLiveRegion :: String, accessibilityRole :: String, accessibilityStates :: Array String, accessibilityTraits :: Array String, accessibilityViewIsModal :: Boolean, accessible :: Boolean, allowFontScaling :: Boolean, autoCapitalize :: String, autoCompleteType :: String, autoCorrect :: Boolean, autoFocus :: Boolean, blurOnSubmit :: Boolean, caretHidden :: Boolean, children :: Array JSX, clearButtonMode :: String, clearTextOnFocus :: Boolean, collapsable :: Boolean, contextMenuHidden :: Boolean, dataDetectorTypes :: Array String, defaultValue :: String, disableFullscreenUI :: Boolean, editable :: Boolean, enablesReturnKeyAutomatically :: Boolean, hasTVPreferredFocus :: Boolean, hitSlop :: Insets, importantForAccessibility :: String, inlineImageLeft :: String, inlineImagePadding :: Number, inputAccessoryViewID :: String, isTVSelectable :: Boolean, key :: String, keyboardAppearance :: String, keyboardType :: String, maxFontSizeMultiplier :: String, maxLength :: Number, multiline :: Boolean, nativeID :: String, needsOffscreenAlphaCompositing :: Boolean, numberOfLines :: Number, onAccessibilityAction :: Effect Unit, onAccessibilityTap :: Effect Unit, onBlur :: EffectFn1 (NativeSyntheticEvent TextInputFocusEventData) Unit, onChange :: EffectFn1 (NativeSyntheticEvent TextInputChangeEventData) Unit, onChangeText :: EffectFn1 String Unit, onContentSizeChange :: EffectFn1 (NativeSyntheticEvent TextInputContentSizeChangeEventData) Unit, onEndEditing :: EffectFn1 (NativeSyntheticEvent TextInputEndEditingEventData) Unit, onFocus :: EffectFn1 (NativeSyntheticEvent TextInputFocusEventData) Unit, onKeyPress :: EffectFn1 (NativeSyntheticEvent TextInputKeyPressEventData) Unit, onLayout :: EffectFn1 LayoutChangeEvent Unit, onMagicTap :: Effect Unit, onMoveShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onMoveShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onResponderEnd :: EffectFn1 GestureResponderEvent Unit, onResponderGrant :: EffectFn1 GestureResponderEvent Unit, onResponderMove :: EffectFn1 GestureResponderEvent Unit, onResponderReject :: EffectFn1 GestureResponderEvent Unit, onResponderRelease :: EffectFn1 GestureResponderEvent Unit, onResponderStart :: EffectFn1 GestureResponderEvent Unit, onResponderTerminate :: EffectFn1 GestureResponderEvent Unit, onResponderTerminationRequest :: EffectFn1 GestureResponderEvent Boolean, onScroll :: EffectFn1 (NativeSyntheticEvent TextInputScrollEventData) Unit, onSelectionChange :: EffectFn1 (NativeSyntheticEvent TextInputSelectionChangeEventData) Unit, onStartShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onSubmitEditing :: EffectFn1 (NativeSyntheticEvent TextInputSubmitEditingEventData) Unit, onTouchCancel :: EffectFn1 GestureResponderEvent Unit, onTouchEnd :: EffectFn1 GestureResponderEvent Unit, onTouchEndCapture :: EffectFn1 GestureResponderEvent Unit, onTouchMove :: EffectFn1 GestureResponderEvent Unit, onTouchStart :: EffectFn1 GestureResponderEvent Unit, placeholder :: String, placeholderTextColor :: String, pointerEvents :: String, removeClippedSubviews :: Boolean, renderToHardwareTextureAndroid :: Boolean, returnKeyLabel :: String, returnKeyType :: String, scrollEnabled :: Boolean, secureTextEntry :: Boolean, selectTextOnFocus :: Boolean, selection :: { end :: Number, start :: Number }, selectionColor :: String, selectionState :: DocumentSelectionState, shouldRasterizeIOS :: Boolean, spellCheck :: Boolean, style :: CSS, testID :: String, textAlignVertical :: String, textBreakStrategy :: String, textContentType :: String, tvParallaxMagnification :: Number, tvParallaxProperties :: { enabled :: Boolean, magnification :: Number, pressDelay :: Number, pressDuration :: Number, pressMagnification :: Number, shiftDistanceX :: Number, shiftDistanceY :: Number, tiltAngle :: Number }, tvParallaxShiftDistanceX :: Number, tvParallaxShiftDistanceY :: Number, tvParallaxTiltAngle :: Number, underlineColorAndroid :: String, value :: String)see https://facebook.github.io/react-native/docs/textinput.html#props
accessibilityActionsProvides an array of custom actions available for accessibility. platform iosaccessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibilityViewIsModalA Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.allowFontScalingSpecifies whether fonts should scale to respect Text Size accessibility settings. The default istrue.autoCapitalizeCan tell TextInput to automatically capitalize certain characters. characters: all characters, words: first letter of each word sentences: first letter of each sentence (default) none: don't auto capitalize anything https://facebook.github.io/react-native/docs/textinput.html#autocapitalizeautoCompleteTypeDetermines which content to suggest on auto complete, e.g.username. To disable auto complete, useoff. Android Only The following values work on Android only: -username-password-email-name-tel-street-address-postal-code-cc-number-cc-csc-cc-exp-cc-exp-month-cc-exp-year-offautoCorrectIf false, disables auto-correct. The default value is true.autoFocusIf true, focuses the input on componentDidMount. The default value is false.blurOnSubmitIf true, the text field will blur when submitted. The default value is true.caretHiddenIf true, caret is hidden. The default value is false.clearButtonModeenum('never', 'while-editing', 'unless-editing', 'always') When the clear button should appear on the right side of the text viewclearTextOnFocusIf true, clears the text field automatically when editing beginscollapsableViews that are only used to layout their children or otherwise don't draw anything may be automatically removed from the native hierarchy as an optimization. Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.contextMenuHiddenIf true, context menu is hidden. The default value is false.dataDetectorTypesDetermines the types of data converted to clickable URLs in the text input. Only valid ifmultiline={true}andeditable={false}. By default no data types are detected. You can provide one type or an array of many types. Possible values fordataDetectorTypesare: -'phoneNumber'-'link'-'address'-'calendarEvent'-'none'-'all'defaultValueProvides an initial value that will change when the user starts typing. Useful for simple use-cases where you don't want to deal with listening to events and updating the value prop to keep the controlled state in sync.disableFullscreenUIWhen false, if there is a small amount of space available around a text input (e.g. landscape orientation on a phone), the OS may choose to have the user edit the text inside of a full screen text input mode. When true, this feature is disabled and users will always edit the text directly inside of the text input. Defaults to false.editableIf false, text is not editable. The default value is true.enablesReturnKeyAutomaticallyIf true, the keyboard disables the return key when there is no text and automatically enables it when there is text. The default value is false.hasTVPreferredFocus(Apple TV only) May be set to true to force the Apple TV focus engine to move focus to this view. platform ioshitSlopThis defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets that are at least 30 - 40 points/density-independent pixels. If a Touchable view has a height of 20 the touchable height can be extended to 40 with hitSlop={{top: 10, bottom: 10, left: 0, right: 0}} NOTE The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.inlineImageLeftIf defined, the provided image resource will be rendered on the left.inlineImagePaddingPadding between the inline image, if any, and the text input itself.inputAccessoryViewIDUsed to connect to an InputAccessoryView. Not part of react-natives documentation, but present in examples and code. See https://facebook.github.io/react-native/docs/inputaccessoryview.html for more information.isTVSelectable(Apple TV only) When set to true, this view will be focusable and navigable using the Apple TV remote. platform ioskeyboardAppearanceDetermines the color of the keyboard.keyboardTypeenum("default", 'numeric', 'email-address', "ascii-capable", 'numbers-and-punctuation', 'url', 'number-pad', 'phone-pad', 'name-phone-pad', 'decimal-pad', 'twitter', 'web-search', 'visible-password') Determines which keyboard to open, e.g.numeric. The following values work across platforms: - default - numeric - email-address - phone-pad The following values work on iOS: - ascii-capable - numbers-and-punctuation - url - number-pad - name-phone-pad - decimal-pad - twitter - web-search The following values work on Android: - visible-passwordmaxFontSizeMultiplierSpecifies largest possible scale a font can reach when allowFontScaling is enabled. Possible values: - null/undefined (default): inherit from the parent node or the global default (0) - 0: no max, ignore parent/global default - >= 1: sets the maxFontSizeMultiplier of this node to this valuemaxLengthLimits the maximum number of characters that can be entered. Use this instead of implementing the logic in JS to avoid flicker.multilineIf true, the text input can be multiple lines. The default value is false.nativeIDUsed to reference react managed views from native code.needsOffscreenAlphaCompositingWhether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. The default (false) falls back to drawing the component and its children with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. This default may be noticeable and undesired in the case where the View you are setting an opacity on has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background). Rendering offscreen to preserve correct alpha behavior is extremely expensive and hard to debug for non-native developers, which is why it is not turned on by default. If you do need to enable this property for an animation, consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). If that property is enabled, this View will be rendered off-screen once, saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU.numberOfLinesSets the number of lines for a TextInput. Use it with multiline set to true to be able to fill the lines.onAccessibilityActionWhenaccessibleis true, the system will try to invoke this function when the user performs an accessibility custom action. platform iosonAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonBlurCallback that is called when the text input is blurredonChangeCallback that is called when the text input's text changes.onChangeTextCallback that is called when the text input's text changes. Changed text is passed as an argument to the callback handler.onContentSizeChangeCallback that is called when the text input's content size changes. This will be called with{ nativeEvent: { contentSize: { width, height } } }. Only called for multiline text inputs.onEndEditingCallback that is called when text input ends.onFocusCallback that is called when the text input is focusedonKeyPressCallback that is called when a key is pressed. This will be called with{ nativeEvent: { key: keyValue } }where keyValue is 'Enter' or 'Backspace' for respective keys and the typed-in character otherwise including ' ' for space. Fires before onChange callbacks. Note: on Android only the inputs from soft keyboard are handled, not the hardware keyboard inputs.onLayoutInvoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height}}}.onMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonMoveShouldSetResponderCalled for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?onMoveShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onResponderEndIf the View returns true and attempts to become the responder, one of the following will happen:onResponderGrantThe View is now responding for touch events. This is the time to highlight and show the user what is happeningonResponderMoveIf the view is responding, the following handlers can be called: The user is moving their fingeronResponderRejectSomething else is the responder right now and will not release itonResponderReleaseFired at the end of the touch, ie "touchUp"onResponderTerminateThe responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationRequest, or might be taken by the OS without asking (happens with control center/ notification center on iOS)onResponderTerminationRequestSomething else wants to become responder. Should this view release the responder? Returning true allows releaseonScrollInvoked on content scroll with{ nativeEvent: { contentOffset: { x, y } } }. May also contain other properties from ScrollEvent but on Android contentSize is not provided for performance reasons.onSelectionChangeCallback that is called when the text input selection is changed.onStartShouldSetResponderA view can become the touch responder by implementing the correct negotiation methods. There are two methods to ask the view if it wants to become responder: Does this view want to become responder on the start of a touch?onStartShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onSubmitEditingCallback that is called when the text input's submit button is pressed.placeholderThe string that will be rendered before text input has been enteredplaceholderTextColorThe text color of the placeholder stringpointerEventsIn the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class: .box-none { pointer-events: none; } .box-none * { pointer-events: all; } box-only is the equivalent of .box-only { pointer-events: all; } .box-only * { pointer-events: none; } But since pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform.removeClippedSubviewsThis is a special performance property exposed by RCTView and is useful for scrolling content when there are many subviews, most of which are offscreen. For this property to be effective, it must be applied to a view that contains many subviews that extend outside its bound. The subviews must also have overflow: hidden, as should the containing view (or one of its superviews).renderToHardwareTextureAndroidWhether this view should render itself (and all of its children) into a single hardware texture on the GPU. On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation.returnKeyLabelSets the return key to the label. Use it instead ofreturnKeyType. platform androidreturnKeyTypeenum('default', 'go', 'google', 'join', 'next', 'route', 'search', 'send', 'yahoo', 'done', 'emergency-call') Determines how the return key should look.scrollEnabledIf false, scrolling of the text view will be disabled. The default value is true. Only works with multiline={true}secureTextEntryIf true, the text input obscures the text entered so that sensitive text like passwords stay secure. The default value is false.selectTextOnFocusIf true, all text will automatically be selected on focusselectionThe start and end of the text input's selection. Set start and end to the same value to position the cursor.selectionColorThe highlight (and cursor on ios) color of the text inputselectionStateSee DocumentSelectionState.js, some state that is responsible for maintaining selection information for a documentshouldRasterizeIOSWhether this view should be rendered as a bitmap before compositing. On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view and quickly composite it during each frame. Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. Test and measure when using this property.spellCheckIf false, disables spell-check style (i.e. red underlines). The default value is inherited from autoCorrectstyleStylestestIDUsed to locate this view in end-to-end teststextAlignVerticalVertically align text whenmultilineis set to truetextBreakStrategySet text break strategy on Android API Level 23+, possible values are simple, highQuality, balanced The default value is simple.textContentTypeGive the keyboard and the system information about the expected semantic meaning for the content that users enter. For iOS 11+ you can settextContentTypetousernameorpasswordto enable autofill of login details from the device keychain. For iOS 12+newPasswordcan be used to indicate a new password input the user may want to save in the keychain, andoneTimeCodecan be used to indicate that a field can be autofilled by a code arriving in an SMS. To disable autofill, set textContentType tonone. Possible values fortextContentTypeare: -'none'-'URL'-'addressCity'-'addressCityAndState'-'addressState'-'countryName'-'creditCardNumber'-'emailAddress'-'familyName'-'fullStreetAddress'-'givenName'-'jobTitle'-'location'-'middleName'-'name'-'namePrefix'-'nameSuffix'-'nickname'-'organizationName'-'postalCode'-'streetAddressLine1'-'streetAddressLine2'-'sublocality'-'telephoneNumber'-'username'-'password'-'newPassword'-'oneTimeCode'tvParallaxMagnification(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 1.0. platform iostvParallaxProperties(Apple TV only) Object with properties to control Apple TV parallax effects. platform iostvParallaxShiftDistanceX(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxShiftDistanceY(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxTiltAngle(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 0.05. platform iosunderlineColorAndroidThe color of the textInput underline.valueThe value to show for the text input. TextInput is a controlled component, which means the native value will be forced to match this value prop if provided. For most uses this works great, but in some cases this may cause flickering - one common cause is preventing edits by keeping value the same. In addition to simply setting the same value, either set editable={false}, or set/update maxLength to prevent unwanted edits without flicker.
#TextInputKeyPressEventData Source
type TextInputKeyPressEventData = { key :: String }#TextInputFocusEventData Source
type TextInputFocusEventData = { eventCount :: Number, target :: Number, text :: String }#TextInputEndEditingEventData Source
type TextInputEndEditingEventData = { text :: String }#TextInputContentSizeChangeEventData Source
type TextInputContentSizeChangeEventData = { contentSize :: { height :: Number, width :: Number } }#TextInputChangeEventData Source
type TextInputChangeEventData = { eventCount :: Number, target :: Number, text :: String }#TargetedEvent Source
type TargetedEvent = { target :: Number }#TabBarIOSProps Source
type TabBarIOSProps = (accessibilityActions :: Array String, accessibilityComponentType :: String, accessibilityElementsHidden :: Boolean, accessibilityHint :: String, accessibilityIgnoresInvertColors :: Boolean, accessibilityLabel :: String, accessibilityLiveRegion :: String, accessibilityRole :: String, accessibilityStates :: Array String, accessibilityTraits :: Array String, accessibilityViewIsModal :: Boolean, accessible :: Boolean, barTintColor :: String, children :: Array JSX, collapsable :: Boolean, hasTVPreferredFocus :: Boolean, hitSlop :: Insets, importantForAccessibility :: String, isTVSelectable :: Boolean, itemPositioning :: String, key :: String, nativeID :: String, needsOffscreenAlphaCompositing :: Boolean, onAccessibilityAction :: Effect Unit, onAccessibilityTap :: Effect Unit, onLayout :: EffectFn1 LayoutChangeEvent Unit, onMagicTap :: Effect Unit, onMoveShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onMoveShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onResponderEnd :: EffectFn1 GestureResponderEvent Unit, onResponderGrant :: EffectFn1 GestureResponderEvent Unit, onResponderMove :: EffectFn1 GestureResponderEvent Unit, onResponderReject :: EffectFn1 GestureResponderEvent Unit, onResponderRelease :: EffectFn1 GestureResponderEvent Unit, onResponderStart :: EffectFn1 GestureResponderEvent Unit, onResponderTerminate :: EffectFn1 GestureResponderEvent Unit, onResponderTerminationRequest :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onTouchCancel :: EffectFn1 GestureResponderEvent Unit, onTouchEnd :: EffectFn1 GestureResponderEvent Unit, onTouchEndCapture :: EffectFn1 GestureResponderEvent Unit, onTouchMove :: EffectFn1 GestureResponderEvent Unit, onTouchStart :: EffectFn1 GestureResponderEvent Unit, pointerEvents :: String, removeClippedSubviews :: Boolean, renderToHardwareTextureAndroid :: Boolean, shouldRasterizeIOS :: Boolean, style :: CSS, testID :: String, tintColor :: String, translucent :: Boolean, tvParallaxMagnification :: Number, tvParallaxProperties :: { enabled :: Boolean, magnification :: Number, pressDelay :: Number, pressDuration :: Number, pressMagnification :: Number, shiftDistanceX :: Number, shiftDistanceY :: Number, tiltAngle :: Number }, tvParallaxShiftDistanceX :: Number, tvParallaxShiftDistanceY :: Number, tvParallaxTiltAngle :: Number, unselectedItemTintColor :: String, unselectedTintColor :: String)see https://facebook.github.io/react-native/docs/tabbarios.html#props
accessibilityActionsProvides an array of custom actions available for accessibility. platform iosaccessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibilityViewIsModalA Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.barTintColorBackground color of the tab barcollapsableViews that are only used to layout their children or otherwise don't draw anything may be automatically removed from the native hierarchy as an optimization. Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.hasTVPreferredFocus(Apple TV only) May be set to true to force the Apple TV focus engine to move focus to this view. platform ioshitSlopThis defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets that are at least 30 - 40 points/density-independent pixels. If a Touchable view has a height of 20 the touchable height can be extended to 40 with hitSlop={{top: 10, bottom: 10, left: 0, right: 0}} NOTE The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.isTVSelectable(Apple TV only) When set to true, this view will be focusable and navigable using the Apple TV remote. platform iositemPositioningSpecifies tab bar item positioning. Available values are: - fill - distributes items across the entire width of the tab bar - center - centers item in the available tab bar space - auto (default) - distributes items dynamically according to the user interface idiom. In a horizontally compact environment (e.g. iPhone 5) this value defaults tofill, in a horizontally regular one (e.g. iPad) it defaults to center.nativeIDUsed to reference react managed views from native code.needsOffscreenAlphaCompositingWhether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. The default (false) falls back to drawing the component and its children with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. This default may be noticeable and undesired in the case where the View you are setting an opacity on has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background). Rendering offscreen to preserve correct alpha behavior is extremely expensive and hard to debug for non-native developers, which is why it is not turned on by default. If you do need to enable this property for an animation, consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). If that property is enabled, this View will be rendered off-screen once, saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU.onAccessibilityActionWhenaccessibleis true, the system will try to invoke this function when the user performs an accessibility custom action. platform iosonAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonLayoutInvoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height}}}.onMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonMoveShouldSetResponderCalled for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?onMoveShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onResponderEndIf the View returns true and attempts to become the responder, one of the following will happen:onResponderGrantThe View is now responding for touch events. This is the time to highlight and show the user what is happeningonResponderMoveIf the view is responding, the following handlers can be called: The user is moving their fingeronResponderRejectSomething else is the responder right now and will not release itonResponderReleaseFired at the end of the touch, ie "touchUp"onResponderTerminateThe responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationRequest, or might be taken by the OS without asking (happens with control center/ notification center on iOS)onResponderTerminationRequestSomething else wants to become responder. Should this view release the responder? Returning true allows releaseonStartShouldSetResponderA view can become the touch responder by implementing the correct negotiation methods. There are two methods to ask the view if it wants to become responder: Does this view want to become responder on the start of a touch?onStartShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.pointerEventsIn the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class: .box-none { pointer-events: none; } .box-none * { pointer-events: all; } box-only is the equivalent of .box-only { pointer-events: all; } .box-only * { pointer-events: none; } But since pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform.removeClippedSubviewsThis is a special performance property exposed by RCTView and is useful for scrolling content when there are many subviews, most of which are offscreen. For this property to be effective, it must be applied to a view that contains many subviews that extend outside its bound. The subviews must also have overflow: hidden, as should the containing view (or one of its superviews).renderToHardwareTextureAndroidWhether this view should render itself (and all of its children) into a single hardware texture on the GPU. On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation.shouldRasterizeIOSWhether this view should be rendered as a bitmap before compositing. On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view and quickly composite it during each frame. Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. Test and measure when using this property.testIDUsed to locate this view in end-to-end tests.tintColorColor of the currently selected tab icontranslucentA Boolean value that indicates whether the tab bar is translucenttvParallaxMagnification(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 1.0. platform iostvParallaxProperties(Apple TV only) Object with properties to control Apple TV parallax effects. platform iostvParallaxShiftDistanceX(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxShiftDistanceY(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxTiltAngle(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 0.05. platform iosunselectedItemTintColorColor of unselected tab icons. Available since iOS 10.unselectedTintColorColor of text on unselected tabs
#TabBarIOSItemProps Source
type TabBarIOSItemProps = (accessibilityActions :: Array String, accessibilityComponentType :: String, accessibilityElementsHidden :: Boolean, accessibilityHint :: String, accessibilityIgnoresInvertColors :: Boolean, accessibilityLabel :: String, accessibilityLiveRegion :: String, accessibilityRole :: String, accessibilityStates :: Array String, accessibilityTraits :: Array String, accessibilityViewIsModal :: Boolean, accessible :: Boolean, badge :: String, badgeColor :: String, children :: Array JSX, collapsable :: Boolean, hasTVPreferredFocus :: Boolean, hitSlop :: Insets, icon :: ImageURISource, importantForAccessibility :: String, isTVSelectable :: Boolean, key :: String, nativeID :: String, needsOffscreenAlphaCompositing :: Boolean, onAccessibilityAction :: Effect Unit, onAccessibilityTap :: Effect Unit, onLayout :: EffectFn1 LayoutChangeEvent Unit, onMagicTap :: Effect Unit, onMoveShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onMoveShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onPress :: Effect Unit, onResponderEnd :: EffectFn1 GestureResponderEvent Unit, onResponderGrant :: EffectFn1 GestureResponderEvent Unit, onResponderMove :: EffectFn1 GestureResponderEvent Unit, onResponderReject :: EffectFn1 GestureResponderEvent Unit, onResponderRelease :: EffectFn1 GestureResponderEvent Unit, onResponderStart :: EffectFn1 GestureResponderEvent Unit, onResponderTerminate :: EffectFn1 GestureResponderEvent Unit, onResponderTerminationRequest :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onTouchCancel :: EffectFn1 GestureResponderEvent Unit, onTouchEnd :: EffectFn1 GestureResponderEvent Unit, onTouchEndCapture :: EffectFn1 GestureResponderEvent Unit, onTouchMove :: EffectFn1 GestureResponderEvent Unit, onTouchStart :: EffectFn1 GestureResponderEvent Unit, pointerEvents :: String, removeClippedSubviews :: Boolean, renderAsOriginal :: Boolean, renderToHardwareTextureAndroid :: Boolean, selected :: Boolean, selectedIcon :: ImageURISource, shouldRasterizeIOS :: Boolean, style :: CSS, systemIcon :: String, testID :: String, title :: String, tvParallaxMagnification :: Number, tvParallaxProperties :: { enabled :: Boolean, magnification :: Number, pressDelay :: Number, pressDuration :: Number, pressMagnification :: Number, shiftDistanceX :: Number, shiftDistanceY :: Number, tiltAngle :: Number }, tvParallaxShiftDistanceX :: Number, tvParallaxShiftDistanceY :: Number, tvParallaxTiltAngle :: Number)see https://facebook.github.io/react-native/docs/tabbarios-item.html#props
accessibilityActionsProvides an array of custom actions available for accessibility. platform iosaccessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibilityViewIsModalA Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.badgeLittle red bubble that sits at the top right of the icon.badgeColorBackground color for the badge. Available since iOS 10.collapsableViews that are only used to layout their children or otherwise don't draw anything may be automatically removed from the native hierarchy as an optimization. Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.hasTVPreferredFocus(Apple TV only) May be set to true to force the Apple TV focus engine to move focus to this view. platform ioshitSlopThis defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets that are at least 30 - 40 points/density-independent pixels. If a Touchable view has a height of 20 the touchable height can be extended to 40 with hitSlop={{top: 10, bottom: 10, left: 0, right: 0}} NOTE The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.iconA custom icon for the tab. It is ignored when a system icon is defined.importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.isTVSelectable(Apple TV only) When set to true, this view will be focusable and navigable using the Apple TV remote. platform iosnativeIDUsed to reference react managed views from native code.needsOffscreenAlphaCompositingWhether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. The default (false) falls back to drawing the component and its children with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. This default may be noticeable and undesired in the case where the View you are setting an opacity on has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background). Rendering offscreen to preserve correct alpha behavior is extremely expensive and hard to debug for non-native developers, which is why it is not turned on by default. If you do need to enable this property for an animation, consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). If that property is enabled, this View will be rendered off-screen once, saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU.onAccessibilityActionWhenaccessibleis true, the system will try to invoke this function when the user performs an accessibility custom action. platform iosonAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonLayoutInvoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height}}}.onMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonMoveShouldSetResponderCalled for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?onMoveShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onPressCallback when this tab is being selected, you should change the state of your component to set selected={true}.onResponderEndIf the View returns true and attempts to become the responder, one of the following will happen:onResponderGrantThe View is now responding for touch events. This is the time to highlight and show the user what is happeningonResponderMoveIf the view is responding, the following handlers can be called: The user is moving their fingeronResponderRejectSomething else is the responder right now and will not release itonResponderReleaseFired at the end of the touch, ie "touchUp"onResponderTerminateThe responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationRequest, or might be taken by the OS without asking (happens with control center/ notification center on iOS)onResponderTerminationRequestSomething else wants to become responder. Should this view release the responder? Returning true allows releaseonStartShouldSetResponderA view can become the touch responder by implementing the correct negotiation methods. There are two methods to ask the view if it wants to become responder: Does this view want to become responder on the start of a touch?onStartShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.pointerEventsIn the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class: .box-none { pointer-events: none; } .box-none * { pointer-events: all; } box-only is the equivalent of .box-only { pointer-events: all; } .box-only * { pointer-events: none; } But since pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform.removeClippedSubviewsThis is a special performance property exposed by RCTView and is useful for scrolling content when there are many subviews, most of which are offscreen. For this property to be effective, it must be applied to a view that contains many subviews that extend outside its bound. The subviews must also have overflow: hidden, as should the containing view (or one of its superviews).renderAsOriginalIf set to true it renders the image as original, it defaults to being displayed as a templaterenderToHardwareTextureAndroidWhether this view should render itself (and all of its children) into a single hardware texture on the GPU. On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation.selectedIt specifies whether the children are visible or not. If you see a blank content, you probably forgot to add a selected one.selectedIconA custom icon when the tab is selected. It is ignored when a system icon is defined. If left empty, the icon will be tinted in blue.shouldRasterizeIOSWhether this view should be rendered as a bitmap before compositing. On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view and quickly composite it during each frame. Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. Test and measure when using this property.styleReact style object.systemIconItems comes with a few predefined system icons. Note that if you are using them, the title and selectedIcon will be overriden with the system ones. enum('bookmarks', 'contacts', 'downloads', 'favorites', 'featured', 'history', 'more', 'most-recent', 'most-viewed', 'recents', 'search', 'top-rated')testIDUsed to locate this view in end-to-end tests.titleText that appears under the icon. It is ignored when a system icon is defined.tvParallaxMagnification(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 1.0. platform iostvParallaxProperties(Apple TV only) Object with properties to control Apple TV parallax effects. platform iostvParallaxShiftDistanceX(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxShiftDistanceY(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxTiltAngle(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 0.05. platform ios
#SwitchProps Source
type SwitchProps = (accessibilityActions :: Array String, accessibilityComponentType :: String, accessibilityElementsHidden :: Boolean, accessibilityHint :: String, accessibilityIgnoresInvertColors :: Boolean, accessibilityLabel :: String, accessibilityLiveRegion :: String, accessibilityRole :: String, accessibilityStates :: Array String, accessibilityTraits :: Array String, accessibilityViewIsModal :: Boolean, accessible :: Boolean, children :: Array JSX, collapsable :: Boolean, disabled :: Boolean, hasTVPreferredFocus :: Boolean, hitSlop :: Insets, importantForAccessibility :: String, ios_backgroundColor :: String, isTVSelectable :: Boolean, key :: String, nativeID :: String, needsOffscreenAlphaCompositing :: Boolean, onAccessibilityAction :: Effect Unit, onAccessibilityTap :: Effect Unit, onLayout :: EffectFn1 LayoutChangeEvent Unit, onMagicTap :: Effect Unit, onMoveShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onMoveShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onResponderEnd :: EffectFn1 GestureResponderEvent Unit, onResponderGrant :: EffectFn1 GestureResponderEvent Unit, onResponderMove :: EffectFn1 GestureResponderEvent Unit, onResponderReject :: EffectFn1 GestureResponderEvent Unit, onResponderRelease :: EffectFn1 GestureResponderEvent Unit, onResponderStart :: EffectFn1 GestureResponderEvent Unit, onResponderTerminate :: EffectFn1 GestureResponderEvent Unit, onResponderTerminationRequest :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onTintColor :: String, onTouchCancel :: EffectFn1 GestureResponderEvent Unit, onTouchEnd :: EffectFn1 GestureResponderEvent Unit, onTouchEndCapture :: EffectFn1 GestureResponderEvent Unit, onTouchMove :: EffectFn1 GestureResponderEvent Unit, onTouchStart :: EffectFn1 GestureResponderEvent Unit, onValueChange :: EffectFn1 Boolean Unit, pointerEvents :: String, removeClippedSubviews :: Boolean, renderToHardwareTextureAndroid :: Boolean, shouldRasterizeIOS :: Boolean, style :: CSS, testID :: String, thumbColor :: String, thumbTintColor :: String, tintColor :: String, trackColor :: { false :: String, true :: String }, tvParallaxMagnification :: Number, tvParallaxProperties :: { enabled :: Boolean, magnification :: Number, pressDelay :: Number, pressDuration :: Number, pressMagnification :: Number, shiftDistanceX :: Number, shiftDistanceY :: Number, tiltAngle :: Number }, tvParallaxShiftDistanceX :: Number, tvParallaxShiftDistanceY :: Number, tvParallaxTiltAngle :: Number, value :: Boolean)accessibilityActionsProvides an array of custom actions available for accessibility. platform iosaccessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibilityViewIsModalA Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.collapsableViews that are only used to layout their children or otherwise don't draw anything may be automatically removed from the native hierarchy as an optimization. Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.disabledIf true the user won't be able to toggle the switch. Default value is false.hasTVPreferredFocus(Apple TV only) May be set to true to force the Apple TV focus engine to move focus to this view. platform ioshitSlopThis defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets that are at least 30 - 40 points/density-independent pixels. If a Touchable view has a height of 20 the touchable height can be extended to 40 with hitSlop={{top: 10, bottom: 10, left: 0, right: 0}} NOTE The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.ios_backgroundColorOn iOS, custom color for the background. Can be seen when the switch value is false or when the switch is disabled.isTVSelectable(Apple TV only) When set to true, this view will be focusable and navigable using the Apple TV remote. platform iosnativeIDUsed to reference react managed views from native code.needsOffscreenAlphaCompositingWhether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. The default (false) falls back to drawing the component and its children with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. This default may be noticeable and undesired in the case where the View you are setting an opacity on has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background). Rendering offscreen to preserve correct alpha behavior is extremely expensive and hard to debug for non-native developers, which is why it is not turned on by default. If you do need to enable this property for an animation, consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). If that property is enabled, this View will be rendered off-screen once, saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU.onAccessibilityActionWhenaccessibleis true, the system will try to invoke this function when the user performs an accessibility custom action. platform iosonAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonLayoutInvoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height}}}.onMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonMoveShouldSetResponderCalled for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?onMoveShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onResponderEndIf the View returns true and attempts to become the responder, one of the following will happen:onResponderGrantThe View is now responding for touch events. This is the time to highlight and show the user what is happeningonResponderMoveIf the view is responding, the following handlers can be called: The user is moving their fingeronResponderRejectSomething else is the responder right now and will not release itonResponderReleaseFired at the end of the touch, ie "touchUp"onResponderTerminateThe responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationRequest, or might be taken by the OS without asking (happens with control center/ notification center on iOS)onResponderTerminationRequestSomething else wants to become responder. Should this view release the responder? Returning true allows releaseonStartShouldSetResponderA view can become the touch responder by implementing the correct negotiation methods. There are two methods to ask the view if it wants to become responder: Does this view want to become responder on the start of a touch?onStartShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onTintColorBackground color when the switch is turned on.onValueChangeInvoked with the new value when the value changes.pointerEventsIn the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class: .box-none { pointer-events: none; } .box-none * { pointer-events: all; } box-only is the equivalent of .box-only { pointer-events: all; } .box-only * { pointer-events: none; } But since pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform.removeClippedSubviewsThis is a special performance property exposed by RCTView and is useful for scrolling content when there are many subviews, most of which are offscreen. For this property to be effective, it must be applied to a view that contains many subviews that extend outside its bound. The subviews must also have overflow: hidden, as should the containing view (or one of its superviews).renderToHardwareTextureAndroidWhether this view should render itself (and all of its children) into a single hardware texture on the GPU. On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation.shouldRasterizeIOSWhether this view should be rendered as a bitmap before compositing. On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view and quickly composite it during each frame. Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. Test and measure when using this property.testIDUsed to locate this view in end-to-end tests.thumbColorColor of the foreground switch grip.thumbTintColorColor of the foreground switch grip.tintColorBackground color when the switch is turned off.trackColorCustom colors for the switch track Color when false and color when truetvParallaxMagnification(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 1.0. platform iostvParallaxProperties(Apple TV only) Object with properties to control Apple TV parallax effects. platform iostvParallaxShiftDistanceX(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxShiftDistanceY(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxTiltAngle(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 0.05. platform iosvalueThe value of the switch. If true the switch will be turned on. Default value is false.
#SwitchIOSProps Source
type SwitchIOSProps = (accessibilityActions :: Array String, accessibilityComponentType :: String, accessibilityElementsHidden :: Boolean, accessibilityHint :: String, accessibilityIgnoresInvertColors :: Boolean, accessibilityLabel :: String, accessibilityLiveRegion :: String, accessibilityRole :: String, accessibilityStates :: Array String, accessibilityTraits :: Array String, accessibilityViewIsModal :: Boolean, accessible :: Boolean, children :: Array JSX, collapsable :: Boolean, disabled :: Boolean, hasTVPreferredFocus :: Boolean, hitSlop :: Insets, importantForAccessibility :: String, isTVSelectable :: Boolean, key :: String, nativeID :: String, needsOffscreenAlphaCompositing :: Boolean, onAccessibilityAction :: Effect Unit, onAccessibilityTap :: Effect Unit, onLayout :: EffectFn1 LayoutChangeEvent Unit, onMagicTap :: Effect Unit, onMoveShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onMoveShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onResponderEnd :: EffectFn1 GestureResponderEvent Unit, onResponderGrant :: EffectFn1 GestureResponderEvent Unit, onResponderMove :: EffectFn1 GestureResponderEvent Unit, onResponderReject :: EffectFn1 GestureResponderEvent Unit, onResponderRelease :: EffectFn1 GestureResponderEvent Unit, onResponderStart :: EffectFn1 GestureResponderEvent Unit, onResponderTerminate :: EffectFn1 GestureResponderEvent Unit, onResponderTerminationRequest :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onTintColor :: String, onTouchCancel :: EffectFn1 GestureResponderEvent Unit, onTouchEnd :: EffectFn1 GestureResponderEvent Unit, onTouchEndCapture :: EffectFn1 GestureResponderEvent Unit, onTouchMove :: EffectFn1 GestureResponderEvent Unit, onTouchStart :: EffectFn1 GestureResponderEvent Unit, onValueChange :: EffectFn1 Boolean Unit, pointerEvents :: String, removeClippedSubviews :: Boolean, renderToHardwareTextureAndroid :: Boolean, shouldRasterizeIOS :: Boolean, style :: CSS, testID :: String, thumbTintColor :: String, tintColor :: String, tvParallaxMagnification :: Number, tvParallaxProperties :: { enabled :: Boolean, magnification :: Number, pressDelay :: Number, pressDuration :: Number, pressMagnification :: Number, shiftDistanceX :: Number, shiftDistanceY :: Number, tiltAngle :: Number }, tvParallaxShiftDistanceX :: Number, tvParallaxShiftDistanceY :: Number, tvParallaxTiltAngle :: Number, value :: Boolean)https://facebook.github.io/react-native/docs/switchios.html#props
accessibilityActionsProvides an array of custom actions available for accessibility. platform iosaccessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibilityViewIsModalA Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.collapsableViews that are only used to layout their children or otherwise don't draw anything may be automatically removed from the native hierarchy as an optimization. Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.disabledIf true the user won't be able to toggle the switch. Default value is false.hasTVPreferredFocus(Apple TV only) May be set to true to force the Apple TV focus engine to move focus to this view. platform ioshitSlopThis defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets that are at least 30 - 40 points/density-independent pixels. If a Touchable view has a height of 20 the touchable height can be extended to 40 with hitSlop={{top: 10, bottom: 10, left: 0, right: 0}} NOTE The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.isTVSelectable(Apple TV only) When set to true, this view will be focusable and navigable using the Apple TV remote. platform iosnativeIDUsed to reference react managed views from native code.needsOffscreenAlphaCompositingWhether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. The default (false) falls back to drawing the component and its children with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. This default may be noticeable and undesired in the case where the View you are setting an opacity on has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background). Rendering offscreen to preserve correct alpha behavior is extremely expensive and hard to debug for non-native developers, which is why it is not turned on by default. If you do need to enable this property for an animation, consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). If that property is enabled, this View will be rendered off-screen once, saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU.onAccessibilityActionWhenaccessibleis true, the system will try to invoke this function when the user performs an accessibility custom action. platform iosonAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonLayoutInvoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height}}}.onMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonMoveShouldSetResponderCalled for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?onMoveShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onResponderEndIf the View returns true and attempts to become the responder, one of the following will happen:onResponderGrantThe View is now responding for touch events. This is the time to highlight and show the user what is happeningonResponderMoveIf the view is responding, the following handlers can be called: The user is moving their fingeronResponderRejectSomething else is the responder right now and will not release itonResponderReleaseFired at the end of the touch, ie "touchUp"onResponderTerminateThe responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationRequest, or might be taken by the OS without asking (happens with control center/ notification center on iOS)onResponderTerminationRequestSomething else wants to become responder. Should this view release the responder? Returning true allows releaseonStartShouldSetResponderA view can become the touch responder by implementing the correct negotiation methods. There are two methods to ask the view if it wants to become responder: Does this view want to become responder on the start of a touch?onStartShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onTintColorBackground color when the switch is turned on.onValueChangeCallback that is called when the user toggles the switch.pointerEventsIn the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class: .box-none { pointer-events: none; } .box-none * { pointer-events: all; } box-only is the equivalent of .box-only { pointer-events: all; } .box-only * { pointer-events: none; } But since pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform.removeClippedSubviewsThis is a special performance property exposed by RCTView and is useful for scrolling content when there are many subviews, most of which are offscreen. For this property to be effective, it must be applied to a view that contains many subviews that extend outside its bound. The subviews must also have overflow: hidden, as should the containing view (or one of its superviews).renderToHardwareTextureAndroidWhether this view should render itself (and all of its children) into a single hardware texture on the GPU. On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation.shouldRasterizeIOSWhether this view should be rendered as a bitmap before compositing. On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view and quickly composite it during each frame. Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. Test and measure when using this property.testIDUsed to locate this view in end-to-end tests.thumbTintColorBackground color for the switch round button.tintColorBackground color when the switch is turned off.tvParallaxMagnification(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 1.0. platform iostvParallaxProperties(Apple TV only) Object with properties to control Apple TV parallax effects. platform iostvParallaxShiftDistanceX(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxShiftDistanceY(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxTiltAngle(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 0.05. platform iosvalueThe value of the switch, if true the switch will be turned on. Default value is false.
#SwipeableListViewProps_required Source
type SwipeableListViewProps_required optional = (bounceFirstRowOnMount :: Boolean, dataSource :: SwipeableListViewDataSource, maxSwipeDistance :: Number, renderRow :: EffectFn4 Foreign String String Boolean JSX | optional)bounceFirstRowOnMountTo alert the user that swiping is possible, the first row can bounce on component mount.dataSourceUseSwipeableListView.getNewDataSource()to get a data source to use, then use it just like you would a normal ListView data source
#SwipeableListViewProps_optional Source
type SwipeableListViewProps_optional = (children :: Array JSX, key :: String)bounceFirstRowOnMountTo alert the user that swiping is possible, the first row can bounce on component mount.dataSourceUseSwipeableListView.getNewDataSource()to get a data source to use, then use it just like you would a normal ListView data source
#SwipeableListViewDataSource Source
data SwipeableListViewDataSource :: Type#StatusBarProps Source
type StatusBarProps = (animated :: Boolean, backgroundColor :: String, barStyle :: String, children :: Array JSX, hidden :: Boolean, key :: String, networkActivityIndicatorVisible :: Boolean, showHideTransition :: String, translucent :: Boolean)animatedIf the transition between status bar property changes should be animated. Supported for backgroundColor, barStyle and hidden.backgroundColorThe background color of the status bar.barStyleSets the color of the status bar text.hiddenIf the status bar is hidden.networkActivityIndicatorVisibleIf the network activity indicator should be visible.showHideTransitionThe transition effect when showing and hiding the status bar using the hidden prop. Defaults to 'fade'.translucentIf the status bar is translucent. When translucent is set to true, the app will draw under the status bar. This is useful when using a semi transparent status bar color.
#SnapshotViewIOSProps_required Source
type SnapshotViewIOSProps_required optional = (testIdentifier :: String | optional)accessibilityActionsProvides an array of custom actions available for accessibility. platform iosaccessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibilityViewIsModalA Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.collapsableViews that are only used to layout their children or otherwise don't draw anything may be automatically removed from the native hierarchy as an optimization. Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.hasTVPreferredFocus(Apple TV only) May be set to true to force the Apple TV focus engine to move focus to this view. platform ioshitSlopThis defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets that are at least 30 - 40 points/density-independent pixels. If a Touchable view has a height of 20 the touchable height can be extended to 40 with hitSlop={{top: 10, bottom: 10, left: 0, right: 0}} NOTE The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.isTVSelectable(Apple TV only) When set to true, this view will be focusable and navigable using the Apple TV remote. platform iosnativeIDUsed to reference react managed views from native code.needsOffscreenAlphaCompositingWhether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. The default (false) falls back to drawing the component and its children with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. This default may be noticeable and undesired in the case where the View you are setting an opacity on has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background). Rendering offscreen to preserve correct alpha behavior is extremely expensive and hard to debug for non-native developers, which is why it is not turned on by default. If you do need to enable this property for an animation, consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). If that property is enabled, this View will be rendered off-screen once, saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU.onAccessibilityActionWhenaccessibleis true, the system will try to invoke this function when the user performs an accessibility custom action. platform iosonAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonLayoutInvoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height}}}.onMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonMoveShouldSetResponderCalled for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?onMoveShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onResponderEndIf the View returns true and attempts to become the responder, one of the following will happen:onResponderGrantThe View is now responding for touch events. This is the time to highlight and show the user what is happeningonResponderMoveIf the view is responding, the following handlers can be called: The user is moving their fingeronResponderRejectSomething else is the responder right now and will not release itonResponderReleaseFired at the end of the touch, ie "touchUp"onResponderTerminateThe responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationRequest, or might be taken by the OS without asking (happens with control center/ notification center on iOS)onResponderTerminationRequestSomething else wants to become responder. Should this view release the responder? Returning true allows releaseonStartShouldSetResponderA view can become the touch responder by implementing the correct negotiation methods. There are two methods to ask the view if it wants to become responder: Does this view want to become responder on the start of a touch?onStartShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.pointerEventsIn the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class: .box-none { pointer-events: none; } .box-none * { pointer-events: all; } box-only is the equivalent of .box-only { pointer-events: all; } .box-only * { pointer-events: none; } But since pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform.removeClippedSubviewsThis is a special performance property exposed by RCTView and is useful for scrolling content when there are many subviews, most of which are offscreen. For this property to be effective, it must be applied to a view that contains many subviews that extend outside its bound. The subviews must also have overflow: hidden, as should the containing view (or one of its superviews).renderToHardwareTextureAndroidWhether this view should render itself (and all of its children) into a single hardware texture on the GPU. On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation.shouldRasterizeIOSWhether this view should be rendered as a bitmap before compositing. On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view and quickly composite it during each frame. Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. Test and measure when using this property.testIDUsed to locate this view in end-to-end tests.tvParallaxMagnification(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 1.0. platform iostvParallaxProperties(Apple TV only) Object with properties to control Apple TV parallax effects. platform iostvParallaxShiftDistanceX(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxShiftDistanceY(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxTiltAngle(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 0.05. platform ios
#SnapshotViewIOSProps_optional Source
type SnapshotViewIOSProps_optional = (accessibilityActions :: Array String, accessibilityComponentType :: String, accessibilityElementsHidden :: Boolean, accessibilityHint :: String, accessibilityIgnoresInvertColors :: Boolean, accessibilityLabel :: String, accessibilityLiveRegion :: String, accessibilityRole :: String, accessibilityStates :: Array String, accessibilityTraits :: Array String, accessibilityViewIsModal :: Boolean, accessible :: Boolean, children :: Array JSX, collapsable :: Boolean, hasTVPreferredFocus :: Boolean, hitSlop :: Insets, importantForAccessibility :: String, isTVSelectable :: Boolean, key :: String, nativeID :: String, needsOffscreenAlphaCompositing :: Boolean, onAccessibilityAction :: Effect Unit, onAccessibilityTap :: Effect Unit, onLayout :: EffectFn1 LayoutChangeEvent Unit, onMagicTap :: Effect Unit, onMoveShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onMoveShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onResponderEnd :: EffectFn1 GestureResponderEvent Unit, onResponderGrant :: EffectFn1 GestureResponderEvent Unit, onResponderMove :: EffectFn1 GestureResponderEvent Unit, onResponderReject :: EffectFn1 GestureResponderEvent Unit, onResponderRelease :: EffectFn1 GestureResponderEvent Unit, onResponderStart :: EffectFn1 GestureResponderEvent Unit, onResponderTerminate :: EffectFn1 GestureResponderEvent Unit, onResponderTerminationRequest :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onTouchCancel :: EffectFn1 GestureResponderEvent Unit, onTouchEnd :: EffectFn1 GestureResponderEvent Unit, onTouchEndCapture :: EffectFn1 GestureResponderEvent Unit, onTouchMove :: EffectFn1 GestureResponderEvent Unit, onTouchStart :: EffectFn1 GestureResponderEvent Unit, pointerEvents :: String, removeClippedSubviews :: Boolean, renderToHardwareTextureAndroid :: Boolean, shouldRasterizeIOS :: Boolean, style :: CSS, testID :: String, tvParallaxMagnification :: Number, tvParallaxProperties :: { enabled :: Boolean, magnification :: Number, pressDelay :: Number, pressDuration :: Number, pressMagnification :: Number, shiftDistanceX :: Number, shiftDistanceY :: Number, tiltAngle :: Number }, tvParallaxShiftDistanceX :: Number, tvParallaxShiftDistanceY :: Number, tvParallaxTiltAngle :: Number)accessibilityActionsProvides an array of custom actions available for accessibility. platform iosaccessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibilityViewIsModalA Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.collapsableViews that are only used to layout their children or otherwise don't draw anything may be automatically removed from the native hierarchy as an optimization. Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.hasTVPreferredFocus(Apple TV only) May be set to true to force the Apple TV focus engine to move focus to this view. platform ioshitSlopThis defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets that are at least 30 - 40 points/density-independent pixels. If a Touchable view has a height of 20 the touchable height can be extended to 40 with hitSlop={{top: 10, bottom: 10, left: 0, right: 0}} NOTE The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.isTVSelectable(Apple TV only) When set to true, this view will be focusable and navigable using the Apple TV remote. platform iosnativeIDUsed to reference react managed views from native code.needsOffscreenAlphaCompositingWhether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. The default (false) falls back to drawing the component and its children with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. This default may be noticeable and undesired in the case where the View you are setting an opacity on has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background). Rendering offscreen to preserve correct alpha behavior is extremely expensive and hard to debug for non-native developers, which is why it is not turned on by default. If you do need to enable this property for an animation, consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). If that property is enabled, this View will be rendered off-screen once, saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU.onAccessibilityActionWhenaccessibleis true, the system will try to invoke this function when the user performs an accessibility custom action. platform iosonAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonLayoutInvoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height}}}.onMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonMoveShouldSetResponderCalled for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?onMoveShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onResponderEndIf the View returns true and attempts to become the responder, one of the following will happen:onResponderGrantThe View is now responding for touch events. This is the time to highlight and show the user what is happeningonResponderMoveIf the view is responding, the following handlers can be called: The user is moving their fingeronResponderRejectSomething else is the responder right now and will not release itonResponderReleaseFired at the end of the touch, ie "touchUp"onResponderTerminateThe responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationRequest, or might be taken by the OS without asking (happens with control center/ notification center on iOS)onResponderTerminationRequestSomething else wants to become responder. Should this view release the responder? Returning true allows releaseonStartShouldSetResponderA view can become the touch responder by implementing the correct negotiation methods. There are two methods to ask the view if it wants to become responder: Does this view want to become responder on the start of a touch?onStartShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.pointerEventsIn the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class: .box-none { pointer-events: none; } .box-none * { pointer-events: all; } box-only is the equivalent of .box-only { pointer-events: all; } .box-only * { pointer-events: none; } But since pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform.removeClippedSubviewsThis is a special performance property exposed by RCTView and is useful for scrolling content when there are many subviews, most of which are offscreen. For this property to be effective, it must be applied to a view that contains many subviews that extend outside its bound. The subviews must also have overflow: hidden, as should the containing view (or one of its superviews).renderToHardwareTextureAndroidWhether this view should render itself (and all of its children) into a single hardware texture on the GPU. On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation.shouldRasterizeIOSWhether this view should be rendered as a bitmap before compositing. On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view and quickly composite it during each frame. Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. Test and measure when using this property.testIDUsed to locate this view in end-to-end tests.tvParallaxMagnification(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 1.0. platform iostvParallaxProperties(Apple TV only) Object with properties to control Apple TV parallax effects. platform iostvParallaxShiftDistanceX(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxShiftDistanceY(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxTiltAngle(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 0.05. platform ios
#SliderProps Source
type SliderProps = (accessibilityActions :: Array String, accessibilityComponentType :: String, accessibilityElementsHidden :: Boolean, accessibilityHint :: String, accessibilityIgnoresInvertColors :: Boolean, accessibilityLabel :: String, accessibilityLiveRegion :: String, accessibilityRole :: String, accessibilityStates :: Array String, accessibilityTraits :: Array String, accessibilityViewIsModal :: Boolean, accessible :: Boolean, children :: Array JSX, collapsable :: Boolean, disabled :: Boolean, hasTVPreferredFocus :: Boolean, hitSlop :: Insets, importantForAccessibility :: String, isTVSelectable :: Boolean, key :: String, maximumTrackImage :: ImageURISource, maximumTrackTintColor :: String, maximumValue :: Number, minimumTrackImage :: ImageURISource, minimumTrackTintColor :: String, minimumValue :: Number, nativeID :: String, needsOffscreenAlphaCompositing :: Boolean, onAccessibilityAction :: Effect Unit, onAccessibilityTap :: Effect Unit, onLayout :: EffectFn1 LayoutChangeEvent Unit, onMagicTap :: Effect Unit, onMoveShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onMoveShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onResponderEnd :: EffectFn1 GestureResponderEvent Unit, onResponderGrant :: EffectFn1 GestureResponderEvent Unit, onResponderMove :: EffectFn1 GestureResponderEvent Unit, onResponderReject :: EffectFn1 GestureResponderEvent Unit, onResponderRelease :: EffectFn1 GestureResponderEvent Unit, onResponderStart :: EffectFn1 GestureResponderEvent Unit, onResponderTerminate :: EffectFn1 GestureResponderEvent Unit, onResponderTerminationRequest :: EffectFn1 GestureResponderEvent Boolean, onSlidingComplete :: EffectFn1 Number Unit, onStartShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onTouchCancel :: EffectFn1 GestureResponderEvent Unit, onTouchEnd :: EffectFn1 GestureResponderEvent Unit, onTouchEndCapture :: EffectFn1 GestureResponderEvent Unit, onTouchMove :: EffectFn1 GestureResponderEvent Unit, onTouchStart :: EffectFn1 GestureResponderEvent Unit, onValueChange :: EffectFn1 Number Unit, pointerEvents :: String, removeClippedSubviews :: Boolean, renderToHardwareTextureAndroid :: Boolean, shouldRasterizeIOS :: Boolean, step :: Number, style :: CSS, testID :: String, thumbImage :: ImageURISource, thumbTintColor :: String, trackImage :: ImageURISource, tvParallaxMagnification :: Number, tvParallaxProperties :: { enabled :: Boolean, magnification :: Number, pressDelay :: Number, pressDuration :: Number, pressMagnification :: Number, shiftDistanceX :: Number, shiftDistanceY :: Number, tiltAngle :: Number }, tvParallaxShiftDistanceX :: Number, tvParallaxShiftDistanceY :: Number, tvParallaxTiltAngle :: Number, value :: Number)accessibilityActionsProvides an array of custom actions available for accessibility. platform iosaccessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibilityViewIsModalA Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.collapsableViews that are only used to layout their children or otherwise don't draw anything may be automatically removed from the native hierarchy as an optimization. Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.disabledIf true the user won't be able to move the slider. Default value is false.hasTVPreferredFocus(Apple TV only) May be set to true to force the Apple TV focus engine to move focus to this view. platform ioshitSlopThis defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets that are at least 30 - 40 points/density-independent pixels. If a Touchable view has a height of 20 the touchable height can be extended to 40 with hitSlop={{top: 10, bottom: 10, left: 0, right: 0}} NOTE The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.isTVSelectable(Apple TV only) When set to true, this view will be focusable and navigable using the Apple TV remote. platform iosmaximumTrackImageAssigns a maximum track image. Only static images are supported. The leftmost pixel of the image will be stretched to fill the track.maximumTrackTintColorThe color used for the track to the right of the button. Overrides the default blue gradient image.maximumValueInitial maximum value of the slider. Default value is 1.minimumTrackImageAssigns a minimum track image. Only static images are supported. The rightmost pixel of the image will be stretched to fill the track.minimumTrackTintColorThe color used for the track to the left of the button. Overrides the default blue gradient image.minimumValueInitial minimum value of the slider. Default value is 0.nativeIDUsed to reference react managed views from native code.needsOffscreenAlphaCompositingWhether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. The default (false) falls back to drawing the component and its children with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. This default may be noticeable and undesired in the case where the View you are setting an opacity on has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background). Rendering offscreen to preserve correct alpha behavior is extremely expensive and hard to debug for non-native developers, which is why it is not turned on by default. If you do need to enable this property for an animation, consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). If that property is enabled, this View will be rendered off-screen once, saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU.onAccessibilityActionWhenaccessibleis true, the system will try to invoke this function when the user performs an accessibility custom action. platform iosonAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonLayoutInvoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height}}}.onMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonMoveShouldSetResponderCalled for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?onMoveShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onResponderEndIf the View returns true and attempts to become the responder, one of the following will happen:onResponderGrantThe View is now responding for touch events. This is the time to highlight and show the user what is happeningonResponderMoveIf the view is responding, the following handlers can be called: The user is moving their fingeronResponderRejectSomething else is the responder right now and will not release itonResponderReleaseFired at the end of the touch, ie "touchUp"onResponderTerminateThe responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationRequest, or might be taken by the OS without asking (happens with control center/ notification center on iOS)onResponderTerminationRequestSomething else wants to become responder. Should this view release the responder? Returning true allows releaseonSlidingCompleteCallback called when the user finishes changing the value (e.g. when the slider is released).onStartShouldSetResponderA view can become the touch responder by implementing the correct negotiation methods. There are two methods to ask the view if it wants to become responder: Does this view want to become responder on the start of a touch?onStartShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onValueChangeCallback continuously called while the user is dragging the slider.pointerEventsIn the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class: .box-none { pointer-events: none; } .box-none * { pointer-events: all; } box-only is the equivalent of .box-only { pointer-events: all; } .box-only * { pointer-events: none; } But since pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform.removeClippedSubviewsThis is a special performance property exposed by RCTView and is useful for scrolling content when there are many subviews, most of which are offscreen. For this property to be effective, it must be applied to a view that contains many subviews that extend outside its bound. The subviews must also have overflow: hidden, as should the containing view (or one of its superviews).renderToHardwareTextureAndroidWhether this view should render itself (and all of its children) into a single hardware texture on the GPU. On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation.shouldRasterizeIOSWhether this view should be rendered as a bitmap before compositing. On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view and quickly composite it during each frame. Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. Test and measure when using this property.stepStep value of the slider. The value should be between 0 and (maximumValue - minimumValue). Default value is 0.styleUsed to style and layout the Slider. See StyleSheet.js and ViewStylePropTypes.js for more info.testIDUsed to locate this view in UI automation tests.thumbImageSets an image for the thumb. Only static images are supported.thumbTintColorColor of the foreground switch grip.trackImageAssigns a single image for the track. Only static images are supported. The center pixel of the image will be stretched to fill the track.tvParallaxMagnification(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 1.0. platform iostvParallaxProperties(Apple TV only) Object with properties to control Apple TV parallax effects. platform iostvParallaxShiftDistanceX(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxShiftDistanceY(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxTiltAngle(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 0.05. platform iosvalueInitial value of the slider. The value should be between minimumValue and maximumValue, which default to 0 and 1 respectively. Default value is 0. This is not a controlled component, you don't need to update the value during dragging.
#SegmentedControlIOSProps Source
type SegmentedControlIOSProps = (accessibilityActions :: Array String, accessibilityComponentType :: String, accessibilityElementsHidden :: Boolean, accessibilityHint :: String, accessibilityIgnoresInvertColors :: Boolean, accessibilityLabel :: String, accessibilityLiveRegion :: String, accessibilityRole :: String, accessibilityStates :: Array String, accessibilityTraits :: Array String, accessibilityViewIsModal :: Boolean, accessible :: Boolean, children :: Array JSX, collapsable :: Boolean, enabled :: Boolean, hasTVPreferredFocus :: Boolean, hitSlop :: Insets, importantForAccessibility :: String, isTVSelectable :: Boolean, key :: String, momentary :: Boolean, nativeID :: String, needsOffscreenAlphaCompositing :: Boolean, onAccessibilityAction :: Effect Unit, onAccessibilityTap :: Effect Unit, onChange :: EffectFn1 (NativeSyntheticEvent NativeSegmentedControlIOSChangeEvent) Unit, onLayout :: EffectFn1 LayoutChangeEvent Unit, onMagicTap :: Effect Unit, onMoveShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onMoveShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onResponderEnd :: EffectFn1 GestureResponderEvent Unit, onResponderGrant :: EffectFn1 GestureResponderEvent Unit, onResponderMove :: EffectFn1 GestureResponderEvent Unit, onResponderReject :: EffectFn1 GestureResponderEvent Unit, onResponderRelease :: EffectFn1 GestureResponderEvent Unit, onResponderStart :: EffectFn1 GestureResponderEvent Unit, onResponderTerminate :: EffectFn1 GestureResponderEvent Unit, onResponderTerminationRequest :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onTouchCancel :: EffectFn1 GestureResponderEvent Unit, onTouchEnd :: EffectFn1 GestureResponderEvent Unit, onTouchEndCapture :: EffectFn1 GestureResponderEvent Unit, onTouchMove :: EffectFn1 GestureResponderEvent Unit, onTouchStart :: EffectFn1 GestureResponderEvent Unit, onValueChange :: EffectFn1 String Unit, pointerEvents :: String, removeClippedSubviews :: Boolean, renderToHardwareTextureAndroid :: Boolean, selectedIndex :: Number, shouldRasterizeIOS :: Boolean, style :: CSS, testID :: String, tintColor :: String, tvParallaxMagnification :: Number, tvParallaxProperties :: { enabled :: Boolean, magnification :: Number, pressDelay :: Number, pressDuration :: Number, pressMagnification :: Number, shiftDistanceX :: Number, shiftDistanceY :: Number, tiltAngle :: Number }, tvParallaxShiftDistanceX :: Number, tvParallaxShiftDistanceY :: Number, tvParallaxTiltAngle :: Number, values :: Array String)accessibilityActionsProvides an array of custom actions available for accessibility. platform iosaccessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibilityViewIsModalA Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.collapsableViews that are only used to layout their children or otherwise don't draw anything may be automatically removed from the native hierarchy as an optimization. Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.enabledIf false the user won't be able to interact with the control. Default value is true.hasTVPreferredFocus(Apple TV only) May be set to true to force the Apple TV focus engine to move focus to this view. platform ioshitSlopThis defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets that are at least 30 - 40 points/density-independent pixels. If a Touchable view has a height of 20 the touchable height can be extended to 40 with hitSlop={{top: 10, bottom: 10, left: 0, right: 0}} NOTE The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.isTVSelectable(Apple TV only) When set to true, this view will be focusable and navigable using the Apple TV remote. platform iosmomentaryIf true, then selecting a segment won't persist visually. The onValueChange callback will still work as expected.nativeIDUsed to reference react managed views from native code.needsOffscreenAlphaCompositingWhether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. The default (false) falls back to drawing the component and its children with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. This default may be noticeable and undesired in the case where the View you are setting an opacity on has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background). Rendering offscreen to preserve correct alpha behavior is extremely expensive and hard to debug for non-native developers, which is why it is not turned on by default. If you do need to enable this property for an animation, consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). If that property is enabled, this View will be rendered off-screen once, saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU.onAccessibilityActionWhenaccessibleis true, the system will try to invoke this function when the user performs an accessibility custom action. platform iosonAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonChangeCallback that is called when the user taps a segment; passes the event as an argumentonLayoutInvoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height}}}.onMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonMoveShouldSetResponderCalled for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?onMoveShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onResponderEndIf the View returns true and attempts to become the responder, one of the following will happen:onResponderGrantThe View is now responding for touch events. This is the time to highlight and show the user what is happeningonResponderMoveIf the view is responding, the following handlers can be called: The user is moving their fingeronResponderRejectSomething else is the responder right now and will not release itonResponderReleaseFired at the end of the touch, ie "touchUp"onResponderTerminateThe responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationRequest, or might be taken by the OS without asking (happens with control center/ notification center on iOS)onResponderTerminationRequestSomething else wants to become responder. Should this view release the responder? Returning true allows releaseonStartShouldSetResponderA view can become the touch responder by implementing the correct negotiation methods. There are two methods to ask the view if it wants to become responder: Does this view want to become responder on the start of a touch?onStartShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onValueChangeCallback that is called when the user taps a segment; passes the segment's value as an argumentpointerEventsIn the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class: .box-none { pointer-events: none; } .box-none * { pointer-events: all; } box-only is the equivalent of .box-only { pointer-events: all; } .box-only * { pointer-events: none; } But since pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform.removeClippedSubviewsThis is a special performance property exposed by RCTView and is useful for scrolling content when there are many subviews, most of which are offscreen. For this property to be effective, it must be applied to a view that contains many subviews that extend outside its bound. The subviews must also have overflow: hidden, as should the containing view (or one of its superviews).renderToHardwareTextureAndroidWhether this view should render itself (and all of its children) into a single hardware texture on the GPU. On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation.selectedIndexThe index in props.values of the segment to be (pre)selected.shouldRasterizeIOSWhether this view should be rendered as a bitmap before compositing. On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view and quickly composite it during each frame. Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. Test and measure when using this property.testIDUsed to locate this view in end-to-end tests.tintColorAccent color of the control.tvParallaxMagnification(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 1.0. platform iostvParallaxProperties(Apple TV only) Object with properties to control Apple TV parallax effects. platform iostvParallaxShiftDistanceX(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxShiftDistanceY(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxTiltAngle(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 0.05. platform iosvaluesThe labels for the control's segment buttons, in order.
#ScrollViewProps Source
type ScrollViewProps = (accessibilityActions :: Array String, accessibilityComponentType :: String, accessibilityElementsHidden :: Boolean, accessibilityHint :: String, accessibilityIgnoresInvertColors :: Boolean, accessibilityLabel :: String, accessibilityLiveRegion :: String, accessibilityRole :: String, accessibilityStates :: Array String, accessibilityTraits :: Array String, accessibilityViewIsModal :: Boolean, accessible :: Boolean, alwaysBounceHorizontal :: Boolean, alwaysBounceVertical :: Boolean, automaticallyAdjustContentInsets :: Boolean, bounces :: Boolean, bouncesZoom :: Boolean, canCancelContentTouches :: Boolean, centerContent :: Boolean, children :: Array JSX, collapsable :: Boolean, contentContainerStyle :: CSS, contentInset :: Insets, contentInsetAdjustmentBehavior :: String, contentOffset :: PointPropType, decelerationRate :: String, directionalLockEnabled :: Boolean, endFillColor :: String, hasTVPreferredFocus :: Boolean, hitSlop :: Insets, horizontal :: Boolean, importantForAccessibility :: String, indicatorStyle :: String, invertStickyHeaders :: Boolean, isTVSelectable :: Boolean, key :: String, keyboardDismissMode :: String, keyboardShouldPersistTaps :: String, maximumZoomScale :: Number, minimumZoomScale :: Number, nativeID :: String, needsOffscreenAlphaCompositing :: Boolean, nestedScrollEnabled :: Boolean, onAccessibilityAction :: Effect Unit, onAccessibilityTap :: Effect Unit, onContentSizeChange :: EffectFn2 Number Number Unit, onLayout :: EffectFn1 LayoutChangeEvent Unit, onMagicTap :: Effect Unit, onMomentumScrollBegin :: EffectFn1 (NativeSyntheticEvent NativeScrollEvent) Unit, onMomentumScrollEnd :: EffectFn1 (NativeSyntheticEvent NativeScrollEvent) Unit, onMoveShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onMoveShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onResponderEnd :: EffectFn1 GestureResponderEvent Unit, onResponderGrant :: EffectFn1 GestureResponderEvent Unit, onResponderMove :: EffectFn1 GestureResponderEvent Unit, onResponderReject :: EffectFn1 GestureResponderEvent Unit, onResponderRelease :: EffectFn1 GestureResponderEvent Unit, onResponderStart :: EffectFn1 GestureResponderEvent Unit, onResponderTerminate :: EffectFn1 GestureResponderEvent Unit, onResponderTerminationRequest :: EffectFn1 GestureResponderEvent Boolean, onScroll :: EffectFn1 (NativeSyntheticEvent NativeScrollEvent) Unit, onScrollAnimationEnd :: Effect Unit, onScrollBeginDrag :: EffectFn1 (NativeSyntheticEvent NativeScrollEvent) Unit, onScrollEndDrag :: EffectFn1 (NativeSyntheticEvent NativeScrollEvent) Unit, onStartShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onTouchCancel :: EffectFn1 GestureResponderEvent Unit, onTouchEnd :: EffectFn1 GestureResponderEvent Unit, onTouchEndCapture :: EffectFn1 GestureResponderEvent Unit, onTouchMove :: EffectFn1 GestureResponderEvent Unit, onTouchStart :: EffectFn1 GestureResponderEvent Unit, overScrollMode :: String, pagingEnabled :: Boolean, pinchGestureEnabled :: Boolean, pointerEvents :: String, refreshControl :: JSX, removeClippedSubviews :: Boolean, renderToHardwareTextureAndroid :: Boolean, scrollEnabled :: Boolean, scrollEventThrottle :: Number, scrollIndicatorInsets :: Insets, scrollPerfTag :: String, scrollsToTop :: Boolean, shouldRasterizeIOS :: Boolean, showsHorizontalScrollIndicator :: Boolean, showsVerticalScrollIndicator :: Boolean, snapToAlignment :: String, snapToEnd :: Boolean, snapToInterval :: Number, snapToOffsets :: Array Number, snapToStart :: Boolean, stickyHeaderIndices :: Array Number, style :: CSS, testID :: String, tvParallaxMagnification :: Number, tvParallaxProperties :: { enabled :: Boolean, magnification :: Number, pressDelay :: Number, pressDuration :: Number, pressMagnification :: Number, shiftDistanceX :: Number, shiftDistanceY :: Number, tiltAngle :: Number }, tvParallaxShiftDistanceX :: Number, tvParallaxShiftDistanceY :: Number, tvParallaxTiltAngle :: Number, zoomScale :: Number)accessibilityActionsProvides an array of custom actions available for accessibility. platform iosaccessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibilityViewIsModalA Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.alwaysBounceHorizontalWhen true the scroll view bounces horizontally when it reaches the end even if the content is smaller than the scroll view itself. The default value is true whenhorizontal={true}and false otherwise.alwaysBounceVerticalWhen true the scroll view bounces vertically when it reaches the end even if the content is smaller than the scroll view itself. The default value is false whenhorizontal={true}and true otherwise.automaticallyAdjustContentInsetsControls whether iOS should automatically adjust the content inset for scroll views that are placed behind a navigation bar or tab bar/ toolbar. The default value is true.bouncesWhen true the scroll view bounces when it reaches the end of the content if the content is larger then the scroll view along the axis of the scroll direction. When false it disables all bouncing even if thealwaysBounce*props are true. The default value is true.bouncesZoomWhen true gestures can drive zoom past min/max and the zoom will animate to the min/max value at gesture end otherwise the zoom will not exceed the limits.canCancelContentTouchesWhen false once tracking starts won't try to drag if the touch moves. The default value is true.centerContentWhen true the scroll view automatically centers the content when the content is smaller than the scroll view bounds; when the content is larger than the scroll view this property has no effect. The default value is false.collapsableViews that are only used to layout their children or otherwise don't draw anything may be automatically removed from the native hierarchy as an optimization. Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.contentContainerStyleThese styles will be applied to the scroll view content container which wraps all of the child views. Example: return ( <ScrollView contentContainerStyle={styles.contentContainer}> </ScrollView> ); ... const styles = StyleSheet.create({ contentContainer: { paddingVertical: 20 } });contentInsetThe amount by which the scroll view content is inset from the edges of the scroll view. Defaults to {0, 0, 0, 0}.contentInsetAdjustmentBehaviorThis property specifies how the safe area insets are used to modify the content area of the scroll view. The default value of this property must be 'automatic'. But the default value is 'never' until RN@0.51.contentOffsetUsed to manually set the starting scroll offset. The default value is {x: 0, y: 0}decelerationRateA floating-point number that determines how quickly the scroll view decelerates after the user lifts their finger. Reasonable choices include - Normal: 0.998 (the default) - Fast: 0.9directionalLockEnabledWhen true the ScrollView will try to lock to only vertical or horizontal scrolling while dragging. The default value is false.endFillColorSometimes a scrollview takes up more space than its content fills. When this is the case, this prop will fill the rest of the scrollview with a color to avoid setting a background and creating unnecessary overdraw. This is an advanced optimization that is not needed in the general case.hasTVPreferredFocus(Apple TV only) May be set to true to force the Apple TV focus engine to move focus to this view. platform ioshitSlopThis defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets that are at least 30 - 40 points/density-independent pixels. If a Touchable view has a height of 20 the touchable height can be extended to 40 with hitSlop={{top: 10, bottom: 10, left: 0, right: 0}} NOTE The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.horizontalWhen true the scroll view's children are arranged horizontally in a row instead of vertically in a column. The default value is false.importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.indicatorStyleThe style of the scroll indicators. - default (the default), same as black. - black, scroll indicator is black. This style is good against a white content background. - white, scroll indicator is white. This style is good against a black content background.invertStickyHeadersIf sticky headers should stick at the bottom instead of the top of the ScrollView. This is usually used with inverted ScrollViews.isTVSelectable(Apple TV only) When set to true, this view will be focusable and navigable using the Apple TV remote. platform ioskeyboardDismissModeDetermines whether the keyboard gets dismissed in response to a drag. - 'none' (the default) drags do not dismiss the keyboard. - 'onDrag' the keyboard is dismissed when a drag begins. - 'interactive' the keyboard is dismissed interactively with the drag and moves in synchrony with the touch; dragging upwards cancels the dismissal.keyboardShouldPersistTapsDetermines when the keyboard should stay visible after a tap. - 'never' (the default), tapping outside of the focused text input when the keyboard is up dismisses the keyboard. When this happens, children won't receive the tap. - 'always', the keyboard will not dismiss automatically, and the scroll view will not catch taps, but children of the scroll view can catch taps. - 'handled', the keyboard will not dismiss automatically when the tap was handled by a children, (or captured by an ancestor). - false, deprecated, use 'never' instead - true, deprecated, use 'always' insteadmaximumZoomScaleThe maximum allowed zoom scale. The default value is 1.0.minimumZoomScaleThe minimum allowed zoom scale. The default value is 1.0.nativeIDUsed to reference react managed views from native code.needsOffscreenAlphaCompositingWhether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. The default (false) falls back to drawing the component and its children with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. This default may be noticeable and undesired in the case where the View you are setting an opacity on has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background). Rendering offscreen to preserve correct alpha behavior is extremely expensive and hard to debug for non-native developers, which is why it is not turned on by default. If you do need to enable this property for an animation, consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). If that property is enabled, this View will be rendered off-screen once, saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU.nestedScrollEnabledEnables nested scrolling for Android API level 21+. Nested scrolling is supported by default on iOS.onAccessibilityActionWhenaccessibleis true, the system will try to invoke this function when the user performs an accessibility custom action. platform iosonAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonContentSizeChangeCalled when scrollable content view of the ScrollView changes. Handler function is passed the content width and content height as parameters: (contentWidth, contentHeight) It's implemented using onLayout handler attached to the content container which this ScrollView renders.onLayoutInvoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height}}}.onMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonMomentumScrollBeginFires when scroll view has begun movingonMomentumScrollEndFires when scroll view has finished movingonMoveShouldSetResponderCalled for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?onMoveShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onResponderEndIf the View returns true and attempts to become the responder, one of the following will happen:onResponderGrantThe View is now responding for touch events. This is the time to highlight and show the user what is happeningonResponderMoveIf the view is responding, the following handlers can be called: The user is moving their fingeronResponderRejectSomething else is the responder right now and will not release itonResponderReleaseFired at the end of the touch, ie "touchUp"onResponderTerminateThe responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationRequest, or might be taken by the OS without asking (happens with control center/ notification center on iOS)onResponderTerminationRequestSomething else wants to become responder. Should this view release the responder? Returning true allows releaseonScrollFires at most once per frame during scrolling. The frequency of the events can be contolled using the scrollEventThrottle prop.onScrollAnimationEndCalled when a scrolling animation ends.onScrollBeginDragFires if a user initiates a scroll gesture.onScrollEndDragFires when a user has finished scrolling.onStartShouldSetResponderA view can become the touch responder by implementing the correct negotiation methods. There are two methods to ask the view if it wants to become responder: Does this view want to become responder on the start of a touch?onStartShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.overScrollModeUsed to override default value of overScroll mode. Possible values: - 'auto' - Default value, allow a user to over-scroll this view only if the content is large enough to meaningfully scroll. - 'always' - Always allow a user to over-scroll this view. - 'never' - Never allow a user to over-scroll this view.pagingEnabledWhen true the scroll view stops on multiples of the scroll view's size when scrolling. This can be used for horizontal pagination. The default value is false.pinchGestureEnabledWhen true, ScrollView allows use of pinch gestures to zoom in and out. The default value is true.pointerEventsIn the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class: .box-none { pointer-events: none; } .box-none * { pointer-events: all; } box-only is the equivalent of .box-only { pointer-events: all; } .box-only * { pointer-events: none; } But since pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform.refreshControlA RefreshControl component, used to provide pull-to-refresh functionality for the ScrollView.removeClippedSubviewsExperimental: When true offscreen child views (whoseoverflowvalue ishidden) are removed from their native backing superview when offscreen. This canimprove scrolling performance on long lists. The default value is false.renderToHardwareTextureAndroidWhether this view should render itself (and all of its children) into a single hardware texture on the GPU. On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation.scrollEnabledWhen false, the content does not scroll. The default value is truescrollEventThrottleThis controls how often the scroll event will be fired while scrolling (in events per seconds). A higher number yields better accuracy for code that is tracking the scroll position, but can lead to scroll performance problems due to the volume of information being send over the bridge. The default value is zero, which means the scroll event will be sent only once each time the view is scrolled.scrollIndicatorInsetsThe amount by which the scroll view indicators are inset from the edges of the scroll view. This should normally be set to the same value as the contentInset. Defaults to {0, 0, 0, 0}.scrollPerfTagTag used to log scroll performance on this scroll view. Will force momentum events to be turned on (see sendMomentumEvents). This doesn't do anything out of the box and you need to implement a custom native FpsListener for it to be useful. platform androidscrollsToTopWhen true the scroll view scrolls to top when the status bar is tapped. The default value is true.shouldRasterizeIOSWhether this view should be rendered as a bitmap before compositing. On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view and quickly composite it during each frame. Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. Test and measure when using this property.showsHorizontalScrollIndicatorWhen true, shows a horizontal scroll indicator.showsVerticalScrollIndicatorWhen true, shows a vertical scroll indicator.snapToAlignmentWhensnapToIntervalis set,snapToAlignmentwill define the relationship of the the snapping to the scroll view. -start(the default) will align the snap at the left (horizontal) or top (vertical) -centerwill align the snap in the center -endwill align the snap at the right (horizontal) or bottom (vertical)snapToEndUse in conjuction withsnapToOffsets. By default, the end of the list counts as a snap offset. SetsnapToEndto false to disable this behavior and allow the list to scroll freely between its end and the lastsnapToOffsetsoffset. The default value is true.snapToIntervalWhen set, causes the scroll view to stop at multiples of the value ofsnapToInterval. This can be used for paginating through children that have lengths smaller than the scroll view. Used in combination withsnapToAlignmentanddecelerationRate="fast". Overrides less configurablepagingEnabledprop.snapToOffsetsWhen set, causes the scroll view to stop at the defined offsets. This can be used for paginating through variously sized children that have lengths smaller than the scroll view. Typically used in combination withdecelerationRate="fast". Overrides less configurablepagingEnabledandsnapToIntervalprops.snapToStartUse in conjuction withsnapToOffsets. By default, the beginning of the list counts as a snap offset. SetsnapToStartto false to disable this behavior and allow the list to scroll freely between its start and the firstsnapToOffsetsoffset. The default value is true.stickyHeaderIndicesAn array of child indices determining which children get docked to the top of the screen when scrolling. For example passingstickyHeaderIndices={[0]}will cause the first child to be fixed to the top of the scroll view. This property is not supported in conjunction withhorizontal={true}.styleStyletestIDUsed to locate this view in end-to-end tests.tvParallaxMagnification(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 1.0. platform iostvParallaxProperties(Apple TV only) Object with properties to control Apple TV parallax effects. platform iostvParallaxShiftDistanceX(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxShiftDistanceY(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxTiltAngle(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 0.05. platform ioszoomScaleThe current scale of the scroll view content. The default value is 1.0.
#Route Source
type Route = { backButtonTitle :: Undefinable String, component :: Undefinable JSX, content :: Undefinable String, id :: Undefinable String, index :: Undefinable Number, message :: Undefinable String, onRightButtonPress :: Undefinable (Effect Unit), passProps :: Undefinable (Object Foreign), rightButtonTitle :: Undefinable String, title :: Undefinable String, wrapperStyle :: Undefinable Foreign }#RefreshControlProps_required Source
type RefreshControlProps_required optional = (refreshing :: Boolean | optional)accessibilityActionsProvides an array of custom actions available for accessibility. platform iosaccessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibilityViewIsModalA Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.collapsableViews that are only used to layout their children or otherwise don't draw anything may be automatically removed from the native hierarchy as an optimization. Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.colorsThe colors (at least one) that will be used to draw the refresh indicator.enabledWhether the pull to refresh functionality is enabled.hasTVPreferredFocus(Apple TV only) May be set to true to force the Apple TV focus engine to move focus to this view. platform ioshitSlopThis defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets that are at least 30 - 40 points/density-independent pixels. If a Touchable view has a height of 20 the touchable height can be extended to 40 with hitSlop={{top: 10, bottom: 10, left: 0, right: 0}} NOTE The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.isTVSelectable(Apple TV only) When set to true, this view will be focusable and navigable using the Apple TV remote. platform iosnativeIDUsed to reference react managed views from native code.needsOffscreenAlphaCompositingWhether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. The default (false) falls back to drawing the component and its children with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. This default may be noticeable and undesired in the case where the View you are setting an opacity on has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background). Rendering offscreen to preserve correct alpha behavior is extremely expensive and hard to debug for non-native developers, which is why it is not turned on by default. If you do need to enable this property for an animation, consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). If that property is enabled, this View will be rendered off-screen once, saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU.onAccessibilityActionWhenaccessibleis true, the system will try to invoke this function when the user performs an accessibility custom action. platform iosonAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonLayoutInvoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height}}}.onMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonMoveShouldSetResponderCalled for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?onMoveShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onRefreshCalled when the view starts refreshing.onResponderEndIf the View returns true and attempts to become the responder, one of the following will happen:onResponderGrantThe View is now responding for touch events. This is the time to highlight and show the user what is happeningonResponderMoveIf the view is responding, the following handlers can be called: The user is moving their fingeronResponderRejectSomething else is the responder right now and will not release itonResponderReleaseFired at the end of the touch, ie "touchUp"onResponderTerminateThe responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationRequest, or might be taken by the OS without asking (happens with control center/ notification center on iOS)onResponderTerminationRequestSomething else wants to become responder. Should this view release the responder? Returning true allows releaseonStartShouldSetResponderA view can become the touch responder by implementing the correct negotiation methods. There are two methods to ask the view if it wants to become responder: Does this view want to become responder on the start of a touch?onStartShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.pointerEventsIn the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class: .box-none { pointer-events: none; } .box-none * { pointer-events: all; } box-only is the equivalent of .box-only { pointer-events: all; } .box-only * { pointer-events: none; } But since pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform.progressBackgroundColorThe background color of the refresh indicator.progressViewOffsetProgress view top offset platform androidrefreshingWhether the view should be indicating an active refresh.removeClippedSubviewsThis is a special performance property exposed by RCTView and is useful for scrolling content when there are many subviews, most of which are offscreen. For this property to be effective, it must be applied to a view that contains many subviews that extend outside its bound. The subviews must also have overflow: hidden, as should the containing view (or one of its superviews).renderToHardwareTextureAndroidWhether this view should render itself (and all of its children) into a single hardware texture on the GPU. On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation.shouldRasterizeIOSWhether this view should be rendered as a bitmap before compositing. On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view and quickly composite it during each frame. Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. Test and measure when using this property.sizeSize of the refresh indicator, see RefreshControl.SIZE.testIDUsed to locate this view in end-to-end tests.tintColorThe color of the refresh indicator.titleThe title displayed under the refresh indicator.titleColorTitle color.tvParallaxMagnification(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 1.0. platform iostvParallaxProperties(Apple TV only) Object with properties to control Apple TV parallax effects. platform iostvParallaxShiftDistanceX(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxShiftDistanceY(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxTiltAngle(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 0.05. platform ios
#RefreshControlProps_optional Source
type RefreshControlProps_optional = (accessibilityActions :: Array String, accessibilityComponentType :: String, accessibilityElementsHidden :: Boolean, accessibilityHint :: String, accessibilityIgnoresInvertColors :: Boolean, accessibilityLabel :: String, accessibilityLiveRegion :: String, accessibilityRole :: String, accessibilityStates :: Array String, accessibilityTraits :: Array String, accessibilityViewIsModal :: Boolean, accessible :: Boolean, children :: Array JSX, collapsable :: Boolean, colors :: Array String, enabled :: Boolean, hasTVPreferredFocus :: Boolean, hitSlop :: Insets, importantForAccessibility :: String, isTVSelectable :: Boolean, key :: String, nativeID :: String, needsOffscreenAlphaCompositing :: Boolean, onAccessibilityAction :: Effect Unit, onAccessibilityTap :: Effect Unit, onLayout :: EffectFn1 LayoutChangeEvent Unit, onMagicTap :: Effect Unit, onMoveShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onMoveShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onRefresh :: Effect Unit, onResponderEnd :: EffectFn1 GestureResponderEvent Unit, onResponderGrant :: EffectFn1 GestureResponderEvent Unit, onResponderMove :: EffectFn1 GestureResponderEvent Unit, onResponderReject :: EffectFn1 GestureResponderEvent Unit, onResponderRelease :: EffectFn1 GestureResponderEvent Unit, onResponderStart :: EffectFn1 GestureResponderEvent Unit, onResponderTerminate :: EffectFn1 GestureResponderEvent Unit, onResponderTerminationRequest :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onTouchCancel :: EffectFn1 GestureResponderEvent Unit, onTouchEnd :: EffectFn1 GestureResponderEvent Unit, onTouchEndCapture :: EffectFn1 GestureResponderEvent Unit, onTouchMove :: EffectFn1 GestureResponderEvent Unit, onTouchStart :: EffectFn1 GestureResponderEvent Unit, pointerEvents :: String, progressBackgroundColor :: String, progressViewOffset :: Number, removeClippedSubviews :: Boolean, renderToHardwareTextureAndroid :: Boolean, shouldRasterizeIOS :: Boolean, size :: Number, style :: CSS, testID :: String, tintColor :: String, title :: String, titleColor :: String, tvParallaxMagnification :: Number, tvParallaxProperties :: { enabled :: Boolean, magnification :: Number, pressDelay :: Number, pressDuration :: Number, pressMagnification :: Number, shiftDistanceX :: Number, shiftDistanceY :: Number, tiltAngle :: Number }, tvParallaxShiftDistanceX :: Number, tvParallaxShiftDistanceY :: Number, tvParallaxTiltAngle :: Number)accessibilityActionsProvides an array of custom actions available for accessibility. platform iosaccessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibilityViewIsModalA Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.collapsableViews that are only used to layout their children or otherwise don't draw anything may be automatically removed from the native hierarchy as an optimization. Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.colorsThe colors (at least one) that will be used to draw the refresh indicator.enabledWhether the pull to refresh functionality is enabled.hasTVPreferredFocus(Apple TV only) May be set to true to force the Apple TV focus engine to move focus to this view. platform ioshitSlopThis defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets that are at least 30 - 40 points/density-independent pixels. If a Touchable view has a height of 20 the touchable height can be extended to 40 with hitSlop={{top: 10, bottom: 10, left: 0, right: 0}} NOTE The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.isTVSelectable(Apple TV only) When set to true, this view will be focusable and navigable using the Apple TV remote. platform iosnativeIDUsed to reference react managed views from native code.needsOffscreenAlphaCompositingWhether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. The default (false) falls back to drawing the component and its children with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. This default may be noticeable and undesired in the case where the View you are setting an opacity on has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background). Rendering offscreen to preserve correct alpha behavior is extremely expensive and hard to debug for non-native developers, which is why it is not turned on by default. If you do need to enable this property for an animation, consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). If that property is enabled, this View will be rendered off-screen once, saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU.onAccessibilityActionWhenaccessibleis true, the system will try to invoke this function when the user performs an accessibility custom action. platform iosonAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonLayoutInvoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height}}}.onMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonMoveShouldSetResponderCalled for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?onMoveShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onRefreshCalled when the view starts refreshing.onResponderEndIf the View returns true and attempts to become the responder, one of the following will happen:onResponderGrantThe View is now responding for touch events. This is the time to highlight and show the user what is happeningonResponderMoveIf the view is responding, the following handlers can be called: The user is moving their fingeronResponderRejectSomething else is the responder right now and will not release itonResponderReleaseFired at the end of the touch, ie "touchUp"onResponderTerminateThe responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationRequest, or might be taken by the OS without asking (happens with control center/ notification center on iOS)onResponderTerminationRequestSomething else wants to become responder. Should this view release the responder? Returning true allows releaseonStartShouldSetResponderA view can become the touch responder by implementing the correct negotiation methods. There are two methods to ask the view if it wants to become responder: Does this view want to become responder on the start of a touch?onStartShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.pointerEventsIn the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class: .box-none { pointer-events: none; } .box-none * { pointer-events: all; } box-only is the equivalent of .box-only { pointer-events: all; } .box-only * { pointer-events: none; } But since pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform.progressBackgroundColorThe background color of the refresh indicator.progressViewOffsetProgress view top offset platform androidrefreshingWhether the view should be indicating an active refresh.removeClippedSubviewsThis is a special performance property exposed by RCTView and is useful for scrolling content when there are many subviews, most of which are offscreen. For this property to be effective, it must be applied to a view that contains many subviews that extend outside its bound. The subviews must also have overflow: hidden, as should the containing view (or one of its superviews).renderToHardwareTextureAndroidWhether this view should render itself (and all of its children) into a single hardware texture on the GPU. On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation.shouldRasterizeIOSWhether this view should be rendered as a bitmap before compositing. On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view and quickly composite it during each frame. Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. Test and measure when using this property.sizeSize of the refresh indicator, see RefreshControl.SIZE.testIDUsed to locate this view in end-to-end tests.tintColorThe color of the refresh indicator.titleThe title displayed under the refresh indicator.titleColorTitle color.tvParallaxMagnification(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 1.0. platform iostvParallaxProperties(Apple TV only) Object with properties to control Apple TV parallax effects. platform iostvParallaxShiftDistanceX(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxShiftDistanceY(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxTiltAngle(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 0.05. platform ios
#RecyclerViewBackedScrollViewProps Source
type RecyclerViewBackedScrollViewProps = (accessibilityActions :: Array String, accessibilityComponentType :: String, accessibilityElementsHidden :: Boolean, accessibilityHint :: String, accessibilityIgnoresInvertColors :: Boolean, accessibilityLabel :: String, accessibilityLiveRegion :: String, accessibilityRole :: String, accessibilityStates :: Array String, accessibilityTraits :: Array String, accessibilityViewIsModal :: Boolean, accessible :: Boolean, alwaysBounceHorizontal :: Boolean, alwaysBounceVertical :: Boolean, automaticallyAdjustContentInsets :: Boolean, bounces :: Boolean, bouncesZoom :: Boolean, canCancelContentTouches :: Boolean, centerContent :: Boolean, children :: Array JSX, collapsable :: Boolean, contentContainerStyle :: CSS, contentInset :: Insets, contentInsetAdjustmentBehavior :: String, contentOffset :: PointPropType, decelerationRate :: String, directionalLockEnabled :: Boolean, endFillColor :: String, hasTVPreferredFocus :: Boolean, hitSlop :: Insets, horizontal :: Boolean, importantForAccessibility :: String, indicatorStyle :: String, invertStickyHeaders :: Boolean, isTVSelectable :: Boolean, key :: String, keyboardDismissMode :: String, keyboardShouldPersistTaps :: String, maximumZoomScale :: Number, minimumZoomScale :: Number, nativeID :: String, needsOffscreenAlphaCompositing :: Boolean, nestedScrollEnabled :: Boolean, onAccessibilityAction :: Effect Unit, onAccessibilityTap :: Effect Unit, onContentSizeChange :: EffectFn2 Number Number Unit, onLayout :: EffectFn1 LayoutChangeEvent Unit, onMagicTap :: Effect Unit, onMomentumScrollBegin :: EffectFn1 (NativeSyntheticEvent NativeScrollEvent) Unit, onMomentumScrollEnd :: EffectFn1 (NativeSyntheticEvent NativeScrollEvent) Unit, onMoveShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onMoveShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onResponderEnd :: EffectFn1 GestureResponderEvent Unit, onResponderGrant :: EffectFn1 GestureResponderEvent Unit, onResponderMove :: EffectFn1 GestureResponderEvent Unit, onResponderReject :: EffectFn1 GestureResponderEvent Unit, onResponderRelease :: EffectFn1 GestureResponderEvent Unit, onResponderStart :: EffectFn1 GestureResponderEvent Unit, onResponderTerminate :: EffectFn1 GestureResponderEvent Unit, onResponderTerminationRequest :: EffectFn1 GestureResponderEvent Boolean, onScroll :: EffectFn1 (NativeSyntheticEvent NativeScrollEvent) Unit, onScrollAnimationEnd :: Effect Unit, onScrollBeginDrag :: EffectFn1 (NativeSyntheticEvent NativeScrollEvent) Unit, onScrollEndDrag :: EffectFn1 (NativeSyntheticEvent NativeScrollEvent) Unit, onStartShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onTouchCancel :: EffectFn1 GestureResponderEvent Unit, onTouchEnd :: EffectFn1 GestureResponderEvent Unit, onTouchEndCapture :: EffectFn1 GestureResponderEvent Unit, onTouchMove :: EffectFn1 GestureResponderEvent Unit, onTouchStart :: EffectFn1 GestureResponderEvent Unit, overScrollMode :: String, pagingEnabled :: Boolean, pinchGestureEnabled :: Boolean, pointerEvents :: String, refreshControl :: JSX, removeClippedSubviews :: Boolean, renderToHardwareTextureAndroid :: Boolean, scrollEnabled :: Boolean, scrollEventThrottle :: Number, scrollIndicatorInsets :: Insets, scrollPerfTag :: String, scrollsToTop :: Boolean, shouldRasterizeIOS :: Boolean, showsHorizontalScrollIndicator :: Boolean, showsVerticalScrollIndicator :: Boolean, snapToAlignment :: String, snapToEnd :: Boolean, snapToInterval :: Number, snapToOffsets :: Array Number, snapToStart :: Boolean, stickyHeaderIndices :: Array Number, style :: CSS, testID :: String, tvParallaxMagnification :: Number, tvParallaxProperties :: { enabled :: Boolean, magnification :: Number, pressDelay :: Number, pressDuration :: Number, pressMagnification :: Number, shiftDistanceX :: Number, shiftDistanceY :: Number, tiltAngle :: Number }, tvParallaxShiftDistanceX :: Number, tvParallaxShiftDistanceY :: Number, tvParallaxTiltAngle :: Number, zoomScale :: Number)accessibilityActionsProvides an array of custom actions available for accessibility. platform iosaccessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibilityViewIsModalA Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.alwaysBounceHorizontalWhen true the scroll view bounces horizontally when it reaches the end even if the content is smaller than the scroll view itself. The default value is true whenhorizontal={true}and false otherwise.alwaysBounceVerticalWhen true the scroll view bounces vertically when it reaches the end even if the content is smaller than the scroll view itself. The default value is false whenhorizontal={true}and true otherwise.automaticallyAdjustContentInsetsControls whether iOS should automatically adjust the content inset for scroll views that are placed behind a navigation bar or tab bar/ toolbar. The default value is true.bouncesWhen true the scroll view bounces when it reaches the end of the content if the content is larger then the scroll view along the axis of the scroll direction. When false it disables all bouncing even if thealwaysBounce*props are true. The default value is true.bouncesZoomWhen true gestures can drive zoom past min/max and the zoom will animate to the min/max value at gesture end otherwise the zoom will not exceed the limits.canCancelContentTouchesWhen false once tracking starts won't try to drag if the touch moves. The default value is true.centerContentWhen true the scroll view automatically centers the content when the content is smaller than the scroll view bounds; when the content is larger than the scroll view this property has no effect. The default value is false.collapsableViews that are only used to layout their children or otherwise don't draw anything may be automatically removed from the native hierarchy as an optimization. Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.contentContainerStyleThese styles will be applied to the scroll view content container which wraps all of the child views. Example: return ( <ScrollView contentContainerStyle={styles.contentContainer}> </ScrollView> ); ... const styles = StyleSheet.create({ contentContainer: { paddingVertical: 20 } });contentInsetThe amount by which the scroll view content is inset from the edges of the scroll view. Defaults to {0, 0, 0, 0}.contentInsetAdjustmentBehaviorThis property specifies how the safe area insets are used to modify the content area of the scroll view. The default value of this property must be 'automatic'. But the default value is 'never' until RN@0.51.contentOffsetUsed to manually set the starting scroll offset. The default value is {x: 0, y: 0}decelerationRateA floating-point number that determines how quickly the scroll view decelerates after the user lifts their finger. Reasonable choices include - Normal: 0.998 (the default) - Fast: 0.9directionalLockEnabledWhen true the ScrollView will try to lock to only vertical or horizontal scrolling while dragging. The default value is false.endFillColorSometimes a scrollview takes up more space than its content fills. When this is the case, this prop will fill the rest of the scrollview with a color to avoid setting a background and creating unnecessary overdraw. This is an advanced optimization that is not needed in the general case.hasTVPreferredFocus(Apple TV only) May be set to true to force the Apple TV focus engine to move focus to this view. platform ioshitSlopThis defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets that are at least 30 - 40 points/density-independent pixels. If a Touchable view has a height of 20 the touchable height can be extended to 40 with hitSlop={{top: 10, bottom: 10, left: 0, right: 0}} NOTE The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.horizontalWhen true the scroll view's children are arranged horizontally in a row instead of vertically in a column. The default value is false.importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.indicatorStyleThe style of the scroll indicators. - default (the default), same as black. - black, scroll indicator is black. This style is good against a white content background. - white, scroll indicator is white. This style is good against a black content background.invertStickyHeadersIf sticky headers should stick at the bottom instead of the top of the ScrollView. This is usually used with inverted ScrollViews.isTVSelectable(Apple TV only) When set to true, this view will be focusable and navigable using the Apple TV remote. platform ioskeyboardDismissModeDetermines whether the keyboard gets dismissed in response to a drag. - 'none' (the default) drags do not dismiss the keyboard. - 'onDrag' the keyboard is dismissed when a drag begins. - 'interactive' the keyboard is dismissed interactively with the drag and moves in synchrony with the touch; dragging upwards cancels the dismissal.keyboardShouldPersistTapsDetermines when the keyboard should stay visible after a tap. - 'never' (the default), tapping outside of the focused text input when the keyboard is up dismisses the keyboard. When this happens, children won't receive the tap. - 'always', the keyboard will not dismiss automatically, and the scroll view will not catch taps, but children of the scroll view can catch taps. - 'handled', the keyboard will not dismiss automatically when the tap was handled by a children, (or captured by an ancestor). - false, deprecated, use 'never' instead - true, deprecated, use 'always' insteadmaximumZoomScaleThe maximum allowed zoom scale. The default value is 1.0.minimumZoomScaleThe minimum allowed zoom scale. The default value is 1.0.nativeIDUsed to reference react managed views from native code.needsOffscreenAlphaCompositingWhether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. The default (false) falls back to drawing the component and its children with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. This default may be noticeable and undesired in the case where the View you are setting an opacity on has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background). Rendering offscreen to preserve correct alpha behavior is extremely expensive and hard to debug for non-native developers, which is why it is not turned on by default. If you do need to enable this property for an animation, consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). If that property is enabled, this View will be rendered off-screen once, saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU.nestedScrollEnabledEnables nested scrolling for Android API level 21+. Nested scrolling is supported by default on iOS.onAccessibilityActionWhenaccessibleis true, the system will try to invoke this function when the user performs an accessibility custom action. platform iosonAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonContentSizeChangeCalled when scrollable content view of the ScrollView changes. Handler function is passed the content width and content height as parameters: (contentWidth, contentHeight) It's implemented using onLayout handler attached to the content container which this ScrollView renders.onLayoutInvoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height}}}.onMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonMomentumScrollBeginFires when scroll view has begun movingonMomentumScrollEndFires when scroll view has finished movingonMoveShouldSetResponderCalled for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?onMoveShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onResponderEndIf the View returns true and attempts to become the responder, one of the following will happen:onResponderGrantThe View is now responding for touch events. This is the time to highlight and show the user what is happeningonResponderMoveIf the view is responding, the following handlers can be called: The user is moving their fingeronResponderRejectSomething else is the responder right now and will not release itonResponderReleaseFired at the end of the touch, ie "touchUp"onResponderTerminateThe responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationRequest, or might be taken by the OS without asking (happens with control center/ notification center on iOS)onResponderTerminationRequestSomething else wants to become responder. Should this view release the responder? Returning true allows releaseonScrollFires at most once per frame during scrolling. The frequency of the events can be contolled using the scrollEventThrottle prop.onScrollAnimationEndCalled when a scrolling animation ends.onScrollBeginDragFires if a user initiates a scroll gesture.onScrollEndDragFires when a user has finished scrolling.onStartShouldSetResponderA view can become the touch responder by implementing the correct negotiation methods. There are two methods to ask the view if it wants to become responder: Does this view want to become responder on the start of a touch?onStartShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.overScrollModeUsed to override default value of overScroll mode. Possible values: - 'auto' - Default value, allow a user to over-scroll this view only if the content is large enough to meaningfully scroll. - 'always' - Always allow a user to over-scroll this view. - 'never' - Never allow a user to over-scroll this view.pagingEnabledWhen true the scroll view stops on multiples of the scroll view's size when scrolling. This can be used for horizontal pagination. The default value is false.pinchGestureEnabledWhen true, ScrollView allows use of pinch gestures to zoom in and out. The default value is true.pointerEventsIn the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class: .box-none { pointer-events: none; } .box-none * { pointer-events: all; } box-only is the equivalent of .box-only { pointer-events: all; } .box-only * { pointer-events: none; } But since pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform.refreshControlA RefreshControl component, used to provide pull-to-refresh functionality for the ScrollView.removeClippedSubviewsExperimental: When true offscreen child views (whoseoverflowvalue ishidden) are removed from their native backing superview when offscreen. This canimprove scrolling performance on long lists. The default value is false.renderToHardwareTextureAndroidWhether this view should render itself (and all of its children) into a single hardware texture on the GPU. On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation.scrollEnabledWhen false, the content does not scroll. The default value is truescrollEventThrottleThis controls how often the scroll event will be fired while scrolling (in events per seconds). A higher number yields better accuracy for code that is tracking the scroll position, but can lead to scroll performance problems due to the volume of information being send over the bridge. The default value is zero, which means the scroll event will be sent only once each time the view is scrolled.scrollIndicatorInsetsThe amount by which the scroll view indicators are inset from the edges of the scroll view. This should normally be set to the same value as the contentInset. Defaults to {0, 0, 0, 0}.scrollPerfTagTag used to log scroll performance on this scroll view. Will force momentum events to be turned on (see sendMomentumEvents). This doesn't do anything out of the box and you need to implement a custom native FpsListener for it to be useful. platform androidscrollsToTopWhen true the scroll view scrolls to top when the status bar is tapped. The default value is true.shouldRasterizeIOSWhether this view should be rendered as a bitmap before compositing. On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view and quickly composite it during each frame. Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. Test and measure when using this property.showsHorizontalScrollIndicatorWhen true, shows a horizontal scroll indicator.showsVerticalScrollIndicatorWhen true, shows a vertical scroll indicator.snapToAlignmentWhensnapToIntervalis set,snapToAlignmentwill define the relationship of the the snapping to the scroll view. -start(the default) will align the snap at the left (horizontal) or top (vertical) -centerwill align the snap in the center -endwill align the snap at the right (horizontal) or bottom (vertical)snapToEndUse in conjuction withsnapToOffsets. By default, the end of the list counts as a snap offset. SetsnapToEndto false to disable this behavior and allow the list to scroll freely between its end and the lastsnapToOffsetsoffset. The default value is true.snapToIntervalWhen set, causes the scroll view to stop at multiples of the value ofsnapToInterval. This can be used for paginating through children that have lengths smaller than the scroll view. Used in combination withsnapToAlignmentanddecelerationRate="fast". Overrides less configurablepagingEnabledprop.snapToOffsetsWhen set, causes the scroll view to stop at the defined offsets. This can be used for paginating through variously sized children that have lengths smaller than the scroll view. Typically used in combination withdecelerationRate="fast". Overrides less configurablepagingEnabledandsnapToIntervalprops.snapToStartUse in conjuction withsnapToOffsets. By default, the beginning of the list counts as a snap offset. SetsnapToStartto false to disable this behavior and allow the list to scroll freely between its start and the firstsnapToOffsetsoffset. The default value is true.stickyHeaderIndicesAn array of child indices determining which children get docked to the top of the screen when scrolling. For example passingstickyHeaderIndices={[0]}will cause the first child to be fixed to the top of the scroll view. This property is not supported in conjunction withhorizontal={true}.styleStyletestIDUsed to locate this view in end-to-end tests.tvParallaxMagnification(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 1.0. platform iostvParallaxProperties(Apple TV only) Object with properties to control Apple TV parallax effects. platform iostvParallaxShiftDistanceX(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxShiftDistanceY(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxTiltAngle(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 0.05. platform ioszoomScaleThe current scale of the scroll view content. The default value is 1.0.
#ProgressViewIOSProps Source
type ProgressViewIOSProps = (accessibilityActions :: Array String, accessibilityComponentType :: String, accessibilityElementsHidden :: Boolean, accessibilityHint :: String, accessibilityIgnoresInvertColors :: Boolean, accessibilityLabel :: String, accessibilityLiveRegion :: String, accessibilityRole :: String, accessibilityStates :: Array String, accessibilityTraits :: Array String, accessibilityViewIsModal :: Boolean, accessible :: Boolean, children :: Array JSX, collapsable :: Boolean, hasTVPreferredFocus :: Boolean, hitSlop :: Insets, importantForAccessibility :: String, isTVSelectable :: Boolean, key :: String, nativeID :: String, needsOffscreenAlphaCompositing :: Boolean, onAccessibilityAction :: Effect Unit, onAccessibilityTap :: Effect Unit, onLayout :: EffectFn1 LayoutChangeEvent Unit, onMagicTap :: Effect Unit, onMoveShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onMoveShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onResponderEnd :: EffectFn1 GestureResponderEvent Unit, onResponderGrant :: EffectFn1 GestureResponderEvent Unit, onResponderMove :: EffectFn1 GestureResponderEvent Unit, onResponderReject :: EffectFn1 GestureResponderEvent Unit, onResponderRelease :: EffectFn1 GestureResponderEvent Unit, onResponderStart :: EffectFn1 GestureResponderEvent Unit, onResponderTerminate :: EffectFn1 GestureResponderEvent Unit, onResponderTerminationRequest :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onTouchCancel :: EffectFn1 GestureResponderEvent Unit, onTouchEnd :: EffectFn1 GestureResponderEvent Unit, onTouchEndCapture :: EffectFn1 GestureResponderEvent Unit, onTouchMove :: EffectFn1 GestureResponderEvent Unit, onTouchStart :: EffectFn1 GestureResponderEvent Unit, pointerEvents :: String, progress :: Number, progressImage :: Array ImageURISource, progressTintColor :: String, progressViewStyle :: String, removeClippedSubviews :: Boolean, renderToHardwareTextureAndroid :: Boolean, shouldRasterizeIOS :: Boolean, style :: CSS, testID :: String, trackImage :: Array ImageURISource, trackTintColor :: String, tvParallaxMagnification :: Number, tvParallaxProperties :: { enabled :: Boolean, magnification :: Number, pressDelay :: Number, pressDuration :: Number, pressMagnification :: Number, shiftDistanceX :: Number, shiftDistanceY :: Number, tiltAngle :: Number }, tvParallaxShiftDistanceX :: Number, tvParallaxShiftDistanceY :: Number, tvParallaxTiltAngle :: Number)see https://facebook.github.io/react-native/docs/progressviewios.html see ProgressViewIOS.ios.js
accessibilityActionsProvides an array of custom actions available for accessibility. platform iosaccessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibilityViewIsModalA Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.collapsableViews that are only used to layout their children or otherwise don't draw anything may be automatically removed from the native hierarchy as an optimization. Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.hasTVPreferredFocus(Apple TV only) May be set to true to force the Apple TV focus engine to move focus to this view. platform ioshitSlopThis defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets that are at least 30 - 40 points/density-independent pixels. If a Touchable view has a height of 20 the touchable height can be extended to 40 with hitSlop={{top: 10, bottom: 10, left: 0, right: 0}} NOTE The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.isTVSelectable(Apple TV only) When set to true, this view will be focusable and navigable using the Apple TV remote. platform iosnativeIDUsed to reference react managed views from native code.needsOffscreenAlphaCompositingWhether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. The default (false) falls back to drawing the component and its children with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. This default may be noticeable and undesired in the case where the View you are setting an opacity on has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background). Rendering offscreen to preserve correct alpha behavior is extremely expensive and hard to debug for non-native developers, which is why it is not turned on by default. If you do need to enable this property for an animation, consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). If that property is enabled, this View will be rendered off-screen once, saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU.onAccessibilityActionWhenaccessibleis true, the system will try to invoke this function when the user performs an accessibility custom action. platform iosonAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonLayoutInvoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height}}}.onMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonMoveShouldSetResponderCalled for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?onMoveShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onResponderEndIf the View returns true and attempts to become the responder, one of the following will happen:onResponderGrantThe View is now responding for touch events. This is the time to highlight and show the user what is happeningonResponderMoveIf the view is responding, the following handlers can be called: The user is moving their fingeronResponderRejectSomething else is the responder right now and will not release itonResponderReleaseFired at the end of the touch, ie "touchUp"onResponderTerminateThe responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationRequest, or might be taken by the OS without asking (happens with control center/ notification center on iOS)onResponderTerminationRequestSomething else wants to become responder. Should this view release the responder? Returning true allows releaseonStartShouldSetResponderA view can become the touch responder by implementing the correct negotiation methods. There are two methods to ask the view if it wants to become responder: Does this view want to become responder on the start of a touch?onStartShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.pointerEventsIn the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class: .box-none { pointer-events: none; } .box-none * { pointer-events: all; } box-only is the equivalent of .box-only { pointer-events: all; } .box-only * { pointer-events: none; } But since pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform.progressThe progress value (between 0 and 1).progressImageA stretchable image to display as the progress bar.progressTintColorThe tint color of the progress bar itself.progressViewStyleThe progress bar style.removeClippedSubviewsThis is a special performance property exposed by RCTView and is useful for scrolling content when there are many subviews, most of which are offscreen. For this property to be effective, it must be applied to a view that contains many subviews that extend outside its bound. The subviews must also have overflow: hidden, as should the containing view (or one of its superviews).renderToHardwareTextureAndroidWhether this view should render itself (and all of its children) into a single hardware texture on the GPU. On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation.shouldRasterizeIOSWhether this view should be rendered as a bitmap before compositing. On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view and quickly composite it during each frame. Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. Test and measure when using this property.testIDUsed to locate this view in end-to-end tests.trackImageA stretchable image to display behind the progress bar.trackTintColorThe tint color of the progress bar track.tvParallaxMagnification(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 1.0. platform iostvParallaxProperties(Apple TV only) Object with properties to control Apple TV parallax effects. platform iostvParallaxShiftDistanceX(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxShiftDistanceY(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxTiltAngle(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 0.05. platform ios
#ProgressBarAndroidProps Source
type ProgressBarAndroidProps = (accessibilityActions :: Array String, accessibilityComponentType :: String, accessibilityElementsHidden :: Boolean, accessibilityHint :: String, accessibilityIgnoresInvertColors :: Boolean, accessibilityLabel :: String, accessibilityLiveRegion :: String, accessibilityRole :: String, accessibilityStates :: Array String, accessibilityTraits :: Array String, accessibilityViewIsModal :: Boolean, accessible :: Boolean, children :: Array JSX, collapsable :: Boolean, color :: String, hasTVPreferredFocus :: Boolean, hitSlop :: Insets, importantForAccessibility :: String, indeterminate :: Boolean, isTVSelectable :: Boolean, key :: String, nativeID :: String, needsOffscreenAlphaCompositing :: Boolean, onAccessibilityAction :: Effect Unit, onAccessibilityTap :: Effect Unit, onLayout :: EffectFn1 LayoutChangeEvent Unit, onMagicTap :: Effect Unit, onMoveShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onMoveShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onResponderEnd :: EffectFn1 GestureResponderEvent Unit, onResponderGrant :: EffectFn1 GestureResponderEvent Unit, onResponderMove :: EffectFn1 GestureResponderEvent Unit, onResponderReject :: EffectFn1 GestureResponderEvent Unit, onResponderRelease :: EffectFn1 GestureResponderEvent Unit, onResponderStart :: EffectFn1 GestureResponderEvent Unit, onResponderTerminate :: EffectFn1 GestureResponderEvent Unit, onResponderTerminationRequest :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onTouchCancel :: EffectFn1 GestureResponderEvent Unit, onTouchEnd :: EffectFn1 GestureResponderEvent Unit, onTouchEndCapture :: EffectFn1 GestureResponderEvent Unit, onTouchMove :: EffectFn1 GestureResponderEvent Unit, onTouchStart :: EffectFn1 GestureResponderEvent Unit, pointerEvents :: String, progress :: Number, removeClippedSubviews :: Boolean, renderToHardwareTextureAndroid :: Boolean, shouldRasterizeIOS :: Boolean, style :: CSS, styleAttr :: String, testID :: String, tvParallaxMagnification :: Number, tvParallaxProperties :: { enabled :: Boolean, magnification :: Number, pressDelay :: Number, pressDuration :: Number, pressMagnification :: Number, shiftDistanceX :: Number, shiftDistanceY :: Number, tiltAngle :: Number }, tvParallaxShiftDistanceX :: Number, tvParallaxShiftDistanceY :: Number, tvParallaxTiltAngle :: Number)see https://facebook.github.io/react-native/docs/progressbarandroid.html see ProgressBarAndroid.android.js
accessibilityActionsProvides an array of custom actions available for accessibility. platform iosaccessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibilityViewIsModalA Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.collapsableViews that are only used to layout their children or otherwise don't draw anything may be automatically removed from the native hierarchy as an optimization. Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.colorColor of the progress bar.hasTVPreferredFocus(Apple TV only) May be set to true to force the Apple TV focus engine to move focus to this view. platform ioshitSlopThis defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets that are at least 30 - 40 points/density-independent pixels. If a Touchable view has a height of 20 the touchable height can be extended to 40 with hitSlop={{top: 10, bottom: 10, left: 0, right: 0}} NOTE The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.indeterminateIf the progress bar will show indeterminate progress. Note that this can only be false if styleAttr is Horizontal.isTVSelectable(Apple TV only) When set to true, this view will be focusable and navigable using the Apple TV remote. platform iosnativeIDUsed to reference react managed views from native code.needsOffscreenAlphaCompositingWhether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. The default (false) falls back to drawing the component and its children with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. This default may be noticeable and undesired in the case where the View you are setting an opacity on has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background). Rendering offscreen to preserve correct alpha behavior is extremely expensive and hard to debug for non-native developers, which is why it is not turned on by default. If you do need to enable this property for an animation, consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). If that property is enabled, this View will be rendered off-screen once, saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU.onAccessibilityActionWhenaccessibleis true, the system will try to invoke this function when the user performs an accessibility custom action. platform iosonAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonLayoutInvoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height}}}.onMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonMoveShouldSetResponderCalled for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?onMoveShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onResponderEndIf the View returns true and attempts to become the responder, one of the following will happen:onResponderGrantThe View is now responding for touch events. This is the time to highlight and show the user what is happeningonResponderMoveIf the view is responding, the following handlers can be called: The user is moving their fingeronResponderRejectSomething else is the responder right now and will not release itonResponderReleaseFired at the end of the touch, ie "touchUp"onResponderTerminateThe responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationRequest, or might be taken by the OS without asking (happens with control center/ notification center on iOS)onResponderTerminationRequestSomething else wants to become responder. Should this view release the responder? Returning true allows releaseonStartShouldSetResponderA view can become the touch responder by implementing the correct negotiation methods. There are two methods to ask the view if it wants to become responder: Does this view want to become responder on the start of a touch?onStartShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.pointerEventsIn the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class: .box-none { pointer-events: none; } .box-none * { pointer-events: all; } box-only is the equivalent of .box-only { pointer-events: all; } .box-only * { pointer-events: none; } But since pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform.progressThe progress value (between 0 and 1).removeClippedSubviewsThis is a special performance property exposed by RCTView and is useful for scrolling content when there are many subviews, most of which are offscreen. For this property to be effective, it must be applied to a view that contains many subviews that extend outside its bound. The subviews must also have overflow: hidden, as should the containing view (or one of its superviews).renderToHardwareTextureAndroidWhether this view should render itself (and all of its children) into a single hardware texture on the GPU. On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation.shouldRasterizeIOSWhether this view should be rendered as a bitmap before compositing. On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view and quickly composite it during each frame. Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. Test and measure when using this property.styleAttrStyle of the ProgressBar. One of: Horizontal Normal (default) Small Large Inverse SmallInverse LargeInversetestIDUsed to locate this view in end-to-end tests.tvParallaxMagnification(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 1.0. platform iostvParallaxProperties(Apple TV only) Object with properties to control Apple TV parallax effects. platform iostvParallaxShiftDistanceX(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxShiftDistanceY(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxTiltAngle(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 0.05. platform ios
#PointPropType Source
type PointPropType = { x :: Number, y :: Number }#PickerProps Source
type PickerProps = (accessibilityActions :: Array String, accessibilityComponentType :: String, accessibilityElementsHidden :: Boolean, accessibilityHint :: String, accessibilityIgnoresInvertColors :: Boolean, accessibilityLabel :: String, accessibilityLiveRegion :: String, accessibilityRole :: String, accessibilityStates :: Array String, accessibilityTraits :: Array String, accessibilityViewIsModal :: Boolean, accessible :: Boolean, children :: Array JSX, collapsable :: Boolean, enabled :: Boolean, hasTVPreferredFocus :: Boolean, hitSlop :: Insets, importantForAccessibility :: String, isTVSelectable :: Boolean, itemStyle :: CSS, key :: String, mode :: String, nativeID :: String, needsOffscreenAlphaCompositing :: Boolean, onAccessibilityAction :: Effect Unit, onAccessibilityTap :: Effect Unit, onLayout :: EffectFn1 LayoutChangeEvent Unit, onMagicTap :: Effect Unit, onMoveShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onMoveShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onResponderEnd :: EffectFn1 GestureResponderEvent Unit, onResponderGrant :: EffectFn1 GestureResponderEvent Unit, onResponderMove :: EffectFn1 GestureResponderEvent Unit, onResponderReject :: EffectFn1 GestureResponderEvent Unit, onResponderRelease :: EffectFn1 GestureResponderEvent Unit, onResponderStart :: EffectFn1 GestureResponderEvent Unit, onResponderTerminate :: EffectFn1 GestureResponderEvent Unit, onResponderTerminationRequest :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onTouchCancel :: EffectFn1 GestureResponderEvent Unit, onTouchEnd :: EffectFn1 GestureResponderEvent Unit, onTouchEndCapture :: EffectFn1 GestureResponderEvent Unit, onTouchMove :: EffectFn1 GestureResponderEvent Unit, onTouchStart :: EffectFn1 GestureResponderEvent Unit, onValueChange :: EffectFn2 Foreign Number Unit, pointerEvents :: String, prompt :: String, removeClippedSubviews :: Boolean, renderToHardwareTextureAndroid :: Boolean, selectedValue :: Foreign, shouldRasterizeIOS :: Boolean, style :: CSS, testID :: String, testId :: String, tvParallaxMagnification :: Number, tvParallaxProperties :: { enabled :: Boolean, magnification :: Number, pressDelay :: Number, pressDuration :: Number, pressMagnification :: Number, shiftDistanceX :: Number, shiftDistanceY :: Number, tiltAngle :: Number }, tvParallaxShiftDistanceX :: Number, tvParallaxShiftDistanceY :: Number, tvParallaxTiltAngle :: Number)see https://facebook.github.io/react-native/docs/picker.html see Picker.js
accessibilityActionsProvides an array of custom actions available for accessibility. platform iosaccessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibilityViewIsModalA Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.collapsableViews that are only used to layout their children or otherwise don't draw anything may be automatically removed from the native hierarchy as an optimization. Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.enabledIf set to false, the picker will be disabled, i.e. the user will not be able to make a selection. platform androidhasTVPreferredFocus(Apple TV only) May be set to true to force the Apple TV focus engine to move focus to this view. platform ioshitSlopThis defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets that are at least 30 - 40 points/density-independent pixels. If a Touchable view has a height of 20 the touchable height can be extended to 40 with hitSlop={{top: 10, bottom: 10, left: 0, right: 0}} NOTE The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.isTVSelectable(Apple TV only) When set to true, this view will be focusable and navigable using the Apple TV remote. platform iositemStyleStyle to apply to each of the item labels. platform iosmodeOn Android, specifies how to display the selection items when the user taps on the picker: - 'dialog': Show a modal dialog. This is the default. - 'dropdown': Shows a dropdown anchored to the picker view platform androidnativeIDUsed to reference react managed views from native code.needsOffscreenAlphaCompositingWhether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. The default (false) falls back to drawing the component and its children with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. This default may be noticeable and undesired in the case where the View you are setting an opacity on has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background). Rendering offscreen to preserve correct alpha behavior is extremely expensive and hard to debug for non-native developers, which is why it is not turned on by default. If you do need to enable this property for an animation, consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). If that property is enabled, this View will be rendered off-screen once, saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU.onAccessibilityActionWhenaccessibleis true, the system will try to invoke this function when the user performs an accessibility custom action. platform iosonAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonLayoutInvoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height}}}.onMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonMoveShouldSetResponderCalled for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?onMoveShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onResponderEndIf the View returns true and attempts to become the responder, one of the following will happen:onResponderGrantThe View is now responding for touch events. This is the time to highlight and show the user what is happeningonResponderMoveIf the view is responding, the following handlers can be called: The user is moving their fingeronResponderRejectSomething else is the responder right now and will not release itonResponderReleaseFired at the end of the touch, ie "touchUp"onResponderTerminateThe responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationRequest, or might be taken by the OS without asking (happens with control center/ notification center on iOS)onResponderTerminationRequestSomething else wants to become responder. Should this view release the responder? Returning true allows releaseonStartShouldSetResponderA view can become the touch responder by implementing the correct negotiation methods. There are two methods to ask the view if it wants to become responder: Does this view want to become responder on the start of a touch?onStartShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onValueChangeCallback for when an item is selected. This is called with the following parameters: - itemValue: the value prop of the item that was selected - itemPosition: the index of the selected item in this pickerpointerEventsIn the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class: .box-none { pointer-events: none; } .box-none * { pointer-events: all; } box-only is the equivalent of .box-only { pointer-events: all; } .box-only * { pointer-events: none; } But since pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform.promptPrompt string for this picker, used on Android in dialog mode as the title of the dialog. platform androidremoveClippedSubviewsThis is a special performance property exposed by RCTView and is useful for scrolling content when there are many subviews, most of which are offscreen. For this property to be effective, it must be applied to a view that contains many subviews that extend outside its bound. The subviews must also have overflow: hidden, as should the containing view (or one of its superviews).renderToHardwareTextureAndroidWhether this view should render itself (and all of its children) into a single hardware texture on the GPU. On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation.selectedValueValue matching value of one of the items. Can be a string or an integer.shouldRasterizeIOSWhether this view should be rendered as a bitmap before compositing. On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view and quickly composite it during each frame. Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. Test and measure when using this property.testIDUsed to locate this view in end-to-end tests.testIdUsed to locate this view in end-to-end tests.tvParallaxMagnification(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 1.0. platform iostvParallaxProperties(Apple TV only) Object with properties to control Apple TV parallax effects. platform iostvParallaxShiftDistanceX(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxShiftDistanceY(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxTiltAngle(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 0.05. platform ios
#PickerItemProps_required Source
type PickerItemProps_required optional = (label :: String | optional)see Picker.js
#PickerIOSProps Source
type PickerIOSProps = (accessibilityActions :: Array String, accessibilityComponentType :: String, accessibilityElementsHidden :: Boolean, accessibilityHint :: String, accessibilityIgnoresInvertColors :: Boolean, accessibilityLabel :: String, accessibilityLiveRegion :: String, accessibilityRole :: String, accessibilityStates :: Array String, accessibilityTraits :: Array String, accessibilityViewIsModal :: Boolean, accessible :: Boolean, children :: Array JSX, collapsable :: Boolean, hasTVPreferredFocus :: Boolean, hitSlop :: Insets, importantForAccessibility :: String, isTVSelectable :: Boolean, itemStyle :: CSS, key :: String, nativeID :: String, needsOffscreenAlphaCompositing :: Boolean, onAccessibilityAction :: Effect Unit, onAccessibilityTap :: Effect Unit, onLayout :: EffectFn1 LayoutChangeEvent Unit, onMagicTap :: Effect Unit, onMoveShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onMoveShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onResponderEnd :: EffectFn1 GestureResponderEvent Unit, onResponderGrant :: EffectFn1 GestureResponderEvent Unit, onResponderMove :: EffectFn1 GestureResponderEvent Unit, onResponderReject :: EffectFn1 GestureResponderEvent Unit, onResponderRelease :: EffectFn1 GestureResponderEvent Unit, onResponderStart :: EffectFn1 GestureResponderEvent Unit, onResponderTerminate :: EffectFn1 GestureResponderEvent Unit, onResponderTerminationRequest :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onTouchCancel :: EffectFn1 GestureResponderEvent Unit, onTouchEnd :: EffectFn1 GestureResponderEvent Unit, onTouchEndCapture :: EffectFn1 GestureResponderEvent Unit, onTouchMove :: EffectFn1 GestureResponderEvent Unit, onTouchStart :: EffectFn1 GestureResponderEvent Unit, onValueChange :: EffectFn1 String Unit, pointerEvents :: String, removeClippedSubviews :: Boolean, renderToHardwareTextureAndroid :: Boolean, selectedValue :: String, shouldRasterizeIOS :: Boolean, style :: CSS, testID :: String, tvParallaxMagnification :: Number, tvParallaxProperties :: { enabled :: Boolean, magnification :: Number, pressDelay :: Number, pressDuration :: Number, pressMagnification :: Number, shiftDistanceX :: Number, shiftDistanceY :: Number, tiltAngle :: Number }, tvParallaxShiftDistanceX :: Number, tvParallaxShiftDistanceY :: Number, tvParallaxTiltAngle :: Number)see https://facebook.github.io/react-native/docs/pickerios.html see PickerIOS.ios.js
accessibilityActionsProvides an array of custom actions available for accessibility. platform iosaccessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibilityViewIsModalA Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.collapsableViews that are only used to layout their children or otherwise don't draw anything may be automatically removed from the native hierarchy as an optimization. Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.hasTVPreferredFocus(Apple TV only) May be set to true to force the Apple TV focus engine to move focus to this view. platform ioshitSlopThis defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets that are at least 30 - 40 points/density-independent pixels. If a Touchable view has a height of 20 the touchable height can be extended to 40 with hitSlop={{top: 10, bottom: 10, left: 0, right: 0}} NOTE The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.isTVSelectable(Apple TV only) When set to true, this view will be focusable and navigable using the Apple TV remote. platform iosnativeIDUsed to reference react managed views from native code.needsOffscreenAlphaCompositingWhether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. The default (false) falls back to drawing the component and its children with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. This default may be noticeable and undesired in the case where the View you are setting an opacity on has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background). Rendering offscreen to preserve correct alpha behavior is extremely expensive and hard to debug for non-native developers, which is why it is not turned on by default. If you do need to enable this property for an animation, consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). If that property is enabled, this View will be rendered off-screen once, saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU.onAccessibilityActionWhenaccessibleis true, the system will try to invoke this function when the user performs an accessibility custom action. platform iosonAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonLayoutInvoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height}}}.onMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonMoveShouldSetResponderCalled for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?onMoveShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onResponderEndIf the View returns true and attempts to become the responder, one of the following will happen:onResponderGrantThe View is now responding for touch events. This is the time to highlight and show the user what is happeningonResponderMoveIf the view is responding, the following handlers can be called: The user is moving their fingeronResponderRejectSomething else is the responder right now and will not release itonResponderReleaseFired at the end of the touch, ie "touchUp"onResponderTerminateThe responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationRequest, or might be taken by the OS without asking (happens with control center/ notification center on iOS)onResponderTerminationRequestSomething else wants to become responder. Should this view release the responder? Returning true allows releaseonStartShouldSetResponderA view can become the touch responder by implementing the correct negotiation methods. There are two methods to ask the view if it wants to become responder: Does this view want to become responder on the start of a touch?onStartShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.pointerEventsIn the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class: .box-none { pointer-events: none; } .box-none * { pointer-events: all; } box-only is the equivalent of .box-only { pointer-events: all; } .box-only * { pointer-events: none; } But since pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform.removeClippedSubviewsThis is a special performance property exposed by RCTView and is useful for scrolling content when there are many subviews, most of which are offscreen. For this property to be effective, it must be applied to a view that contains many subviews that extend outside its bound. The subviews must also have overflow: hidden, as should the containing view (or one of its superviews).renderToHardwareTextureAndroidWhether this view should render itself (and all of its children) into a single hardware texture on the GPU. On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation.shouldRasterizeIOSWhether this view should be rendered as a bitmap before compositing. On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view and quickly composite it during each frame. Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. Test and measure when using this property.testIDUsed to locate this view in end-to-end tests.tvParallaxMagnification(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 1.0. platform iostvParallaxProperties(Apple TV only) Object with properties to control Apple TV parallax effects. platform iostvParallaxShiftDistanceX(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxShiftDistanceY(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxTiltAngle(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 0.05. platform ios
#NativeTouchEvent Source
newtype NativeTouchEventConstructors
NativeTouchEvent { changedTouches :: Array NativeTouchEvent, identifier :: String, locationX :: Number, locationY :: Number, pageX :: Number, pageY :: Number, target :: String, timestamp :: Number, touches :: Array NativeTouchEvent }
#NativeSegmentedControlIOSChangeEvent Source
type NativeSegmentedControlIOSChangeEvent = { selectedSegmentIndex :: Number, target :: Number, value :: String }#NativeScrollVelocity Source
type NativeScrollVelocity = { x :: Number, y :: Number }#NativeScrollSize Source
type NativeScrollSize = { height :: Number, width :: Number }#NativeScrollRectangle Source
type NativeScrollRectangle = { bottom :: Number, left :: Number, right :: Number, top :: Number }#NativeScrollPoint Source
type NativeScrollPoint = { x :: Number, y :: Number }#NativeScrollEvent Source
type NativeScrollEvent = { contentInset :: NativeScrollRectangle, contentOffset :: NativeScrollPoint, contentSize :: NativeScrollSize, layoutMeasurement :: NativeScrollSize, velocity :: Undefinable NativeScrollVelocity, zoomScale :: Number }#MaskedViewIOSProps_required Source
type MaskedViewIOSProps_required optional = (maskElement :: JSX | optional)accessibilityActionsProvides an array of custom actions available for accessibility. platform iosaccessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibilityViewIsModalA Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.collapsableViews that are only used to layout their children or otherwise don't draw anything may be automatically removed from the native hierarchy as an optimization. Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.hasTVPreferredFocus(Apple TV only) May be set to true to force the Apple TV focus engine to move focus to this view. platform ioshitSlopThis defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets that are at least 30 - 40 points/density-independent pixels. If a Touchable view has a height of 20 the touchable height can be extended to 40 with hitSlop={{top: 10, bottom: 10, left: 0, right: 0}} NOTE The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.isTVSelectable(Apple TV only) When set to true, this view will be focusable and navigable using the Apple TV remote. platform iosnativeIDUsed to reference react managed views from native code.needsOffscreenAlphaCompositingWhether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. The default (false) falls back to drawing the component and its children with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. This default may be noticeable and undesired in the case where the View you are setting an opacity on has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background). Rendering offscreen to preserve correct alpha behavior is extremely expensive and hard to debug for non-native developers, which is why it is not turned on by default. If you do need to enable this property for an animation, consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). If that property is enabled, this View will be rendered off-screen once, saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU.onAccessibilityActionWhenaccessibleis true, the system will try to invoke this function when the user performs an accessibility custom action. platform iosonAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonLayoutInvoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height}}}.onMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonMoveShouldSetResponderCalled for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?onMoveShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onResponderEndIf the View returns true and attempts to become the responder, one of the following will happen:onResponderGrantThe View is now responding for touch events. This is the time to highlight and show the user what is happeningonResponderMoveIf the view is responding, the following handlers can be called: The user is moving their fingeronResponderRejectSomething else is the responder right now and will not release itonResponderReleaseFired at the end of the touch, ie "touchUp"onResponderTerminateThe responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationRequest, or might be taken by the OS without asking (happens with control center/ notification center on iOS)onResponderTerminationRequestSomething else wants to become responder. Should this view release the responder? Returning true allows releaseonStartShouldSetResponderA view can become the touch responder by implementing the correct negotiation methods. There are two methods to ask the view if it wants to become responder: Does this view want to become responder on the start of a touch?onStartShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.pointerEventsIn the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class: .box-none { pointer-events: none; } .box-none * { pointer-events: all; } box-only is the equivalent of .box-only { pointer-events: all; } .box-only * { pointer-events: none; } But since pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform.removeClippedSubviewsThis is a special performance property exposed by RCTView and is useful for scrolling content when there are many subviews, most of which are offscreen. For this property to be effective, it must be applied to a view that contains many subviews that extend outside its bound. The subviews must also have overflow: hidden, as should the containing view (or one of its superviews).renderToHardwareTextureAndroidWhether this view should render itself (and all of its children) into a single hardware texture on the GPU. On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation.shouldRasterizeIOSWhether this view should be rendered as a bitmap before compositing. On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view and quickly composite it during each frame. Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. Test and measure when using this property.testIDUsed to locate this view in end-to-end tests.tvParallaxMagnification(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 1.0. platform iostvParallaxProperties(Apple TV only) Object with properties to control Apple TV parallax effects. platform iostvParallaxShiftDistanceX(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxShiftDistanceY(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxTiltAngle(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 0.05. platform ios
#MaskedViewIOSProps_optional Source
type MaskedViewIOSProps_optional = (accessibilityActions :: Array String, accessibilityComponentType :: String, accessibilityElementsHidden :: Boolean, accessibilityHint :: String, accessibilityIgnoresInvertColors :: Boolean, accessibilityLabel :: String, accessibilityLiveRegion :: String, accessibilityRole :: String, accessibilityStates :: Array String, accessibilityTraits :: Array String, accessibilityViewIsModal :: Boolean, accessible :: Boolean, children :: Array JSX, collapsable :: Boolean, hasTVPreferredFocus :: Boolean, hitSlop :: Insets, importantForAccessibility :: String, isTVSelectable :: Boolean, key :: String, nativeID :: String, needsOffscreenAlphaCompositing :: Boolean, onAccessibilityAction :: Effect Unit, onAccessibilityTap :: Effect Unit, onLayout :: EffectFn1 LayoutChangeEvent Unit, onMagicTap :: Effect Unit, onMoveShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onMoveShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onResponderEnd :: EffectFn1 GestureResponderEvent Unit, onResponderGrant :: EffectFn1 GestureResponderEvent Unit, onResponderMove :: EffectFn1 GestureResponderEvent Unit, onResponderReject :: EffectFn1 GestureResponderEvent Unit, onResponderRelease :: EffectFn1 GestureResponderEvent Unit, onResponderStart :: EffectFn1 GestureResponderEvent Unit, onResponderTerminate :: EffectFn1 GestureResponderEvent Unit, onResponderTerminationRequest :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onTouchCancel :: EffectFn1 GestureResponderEvent Unit, onTouchEnd :: EffectFn1 GestureResponderEvent Unit, onTouchEndCapture :: EffectFn1 GestureResponderEvent Unit, onTouchMove :: EffectFn1 GestureResponderEvent Unit, onTouchStart :: EffectFn1 GestureResponderEvent Unit, pointerEvents :: String, removeClippedSubviews :: Boolean, renderToHardwareTextureAndroid :: Boolean, shouldRasterizeIOS :: Boolean, style :: CSS, testID :: String, tvParallaxMagnification :: Number, tvParallaxProperties :: { enabled :: Boolean, magnification :: Number, pressDelay :: Number, pressDuration :: Number, pressMagnification :: Number, shiftDistanceX :: Number, shiftDistanceY :: Number, tiltAngle :: Number }, tvParallaxShiftDistanceX :: Number, tvParallaxShiftDistanceY :: Number, tvParallaxTiltAngle :: Number)accessibilityActionsProvides an array of custom actions available for accessibility. platform iosaccessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibilityViewIsModalA Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.collapsableViews that are only used to layout their children or otherwise don't draw anything may be automatically removed from the native hierarchy as an optimization. Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.hasTVPreferredFocus(Apple TV only) May be set to true to force the Apple TV focus engine to move focus to this view. platform ioshitSlopThis defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets that are at least 30 - 40 points/density-independent pixels. If a Touchable view has a height of 20 the touchable height can be extended to 40 with hitSlop={{top: 10, bottom: 10, left: 0, right: 0}} NOTE The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.isTVSelectable(Apple TV only) When set to true, this view will be focusable and navigable using the Apple TV remote. platform iosnativeIDUsed to reference react managed views from native code.needsOffscreenAlphaCompositingWhether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. The default (false) falls back to drawing the component and its children with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. This default may be noticeable and undesired in the case where the View you are setting an opacity on has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background). Rendering offscreen to preserve correct alpha behavior is extremely expensive and hard to debug for non-native developers, which is why it is not turned on by default. If you do need to enable this property for an animation, consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). If that property is enabled, this View will be rendered off-screen once, saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU.onAccessibilityActionWhenaccessibleis true, the system will try to invoke this function when the user performs an accessibility custom action. platform iosonAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonLayoutInvoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height}}}.onMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonMoveShouldSetResponderCalled for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?onMoveShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onResponderEndIf the View returns true and attempts to become the responder, one of the following will happen:onResponderGrantThe View is now responding for touch events. This is the time to highlight and show the user what is happeningonResponderMoveIf the view is responding, the following handlers can be called: The user is moving their fingeronResponderRejectSomething else is the responder right now and will not release itonResponderReleaseFired at the end of the touch, ie "touchUp"onResponderTerminateThe responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationRequest, or might be taken by the OS without asking (happens with control center/ notification center on iOS)onResponderTerminationRequestSomething else wants to become responder. Should this view release the responder? Returning true allows releaseonStartShouldSetResponderA view can become the touch responder by implementing the correct negotiation methods. There are two methods to ask the view if it wants to become responder: Does this view want to become responder on the start of a touch?onStartShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.pointerEventsIn the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class: .box-none { pointer-events: none; } .box-none * { pointer-events: all; } box-only is the equivalent of .box-only { pointer-events: all; } .box-only * { pointer-events: none; } But since pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform.removeClippedSubviewsThis is a special performance property exposed by RCTView and is useful for scrolling content when there are many subviews, most of which are offscreen. For this property to be effective, it must be applied to a view that contains many subviews that extend outside its bound. The subviews must also have overflow: hidden, as should the containing view (or one of its superviews).renderToHardwareTextureAndroidWhether this view should render itself (and all of its children) into a single hardware texture on the GPU. On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation.shouldRasterizeIOSWhether this view should be rendered as a bitmap before compositing. On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view and quickly composite it during each frame. Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. Test and measure when using this property.testIDUsed to locate this view in end-to-end tests.tvParallaxMagnification(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 1.0. platform iostvParallaxProperties(Apple TV only) Object with properties to control Apple TV parallax effects. platform iostvParallaxShiftDistanceX(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxShiftDistanceY(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxTiltAngle(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 0.05. platform ios
#ListViewProps_required Source
type ListViewProps_required optional = (dataSource :: ListViewDataSource, renderRow :: EffectFn4 Foreign String String Boolean JSX | optional)see https://facebook.github.io/react-native/docs/listview.html#props
accessibilityActionsProvides an array of custom actions available for accessibility. platform iosaccessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibilityViewIsModalA Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.alwaysBounceHorizontalWhen true the scroll view bounces horizontally when it reaches the end even if the content is smaller than the scroll view itself. The default value is true whenhorizontal={true}and false otherwise.alwaysBounceVerticalWhen true the scroll view bounces vertically when it reaches the end even if the content is smaller than the scroll view itself. The default value is false whenhorizontal={true}and true otherwise.automaticallyAdjustContentInsetsControls whether iOS should automatically adjust the content inset for scroll views that are placed behind a navigation bar or tab bar/ toolbar. The default value is true.bouncesWhen true the scroll view bounces when it reaches the end of the content if the content is larger then the scroll view along the axis of the scroll direction. When false it disables all bouncing even if thealwaysBounce*props are true. The default value is true.bouncesZoomWhen true gestures can drive zoom past min/max and the zoom will animate to the min/max value at gesture end otherwise the zoom will not exceed the limits.canCancelContentTouchesWhen false once tracking starts won't try to drag if the touch moves. The default value is true.centerContentWhen true the scroll view automatically centers the content when the content is smaller than the scroll view bounds; when the content is larger than the scroll view this property has no effect. The default value is false.collapsableViews that are only used to layout their children or otherwise don't draw anything may be automatically removed from the native hierarchy as an optimization. Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.contentContainerStyleThese styles will be applied to the scroll view content container which wraps all of the child views. Example: return ( <ScrollView contentContainerStyle={styles.contentContainer}> </ScrollView> ); ... const styles = StyleSheet.create({ contentContainer: { paddingVertical: 20 } });contentInsetThe amount by which the scroll view content is inset from the edges of the scroll view. Defaults to {0, 0, 0, 0}.contentInsetAdjustmentBehaviorThis property specifies how the safe area insets are used to modify the content area of the scroll view. The default value of this property must be 'automatic'. But the default value is 'never' until RN@0.51.contentOffsetUsed to manually set the starting scroll offset. The default value is {x: 0, y: 0}dataSourceAn instance of ListView.DataSource to usedecelerationRateA floating-point number that determines how quickly the scroll view decelerates after the user lifts their finger. Reasonable choices include - Normal: 0.998 (the default) - Fast: 0.9directionalLockEnabledWhen true the ScrollView will try to lock to only vertical or horizontal scrolling while dragging. The default value is false.enableEmptySectionsFlag indicating whether empty section headers should be rendered. In the future release empty section headers will be rendered by default, and the flag will be deprecated. If empty sections are not desired to be rendered their indices should be excluded from sectionID object.endFillColorSometimes a scrollview takes up more space than its content fills. When this is the case, this prop will fill the rest of the scrollview with a color to avoid setting a background and creating unnecessary overdraw. This is an advanced optimization that is not needed in the general case.hasTVPreferredFocus(Apple TV only) May be set to true to force the Apple TV focus engine to move focus to this view. platform ioshitSlopThis defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets that are at least 30 - 40 points/density-independent pixels. If a Touchable view has a height of 20 the touchable height can be extended to 40 with hitSlop={{top: 10, bottom: 10, left: 0, right: 0}} NOTE The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.horizontalWhen true the scroll view's children are arranged horizontally in a row instead of vertically in a column. The default value is false.importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.indicatorStyleThe style of the scroll indicators. - default (the default), same as black. - black, scroll indicator is black. This style is good against a white content background. - white, scroll indicator is white. This style is good against a black content background.initialListSizeHow many rows to render on initial component mount. Use this to make it so that the first screen worth of data apears at one time instead of over the course of multiple frames.invertStickyHeadersIf sticky headers should stick at the bottom instead of the top of the ScrollView. This is usually used with inverted ScrollViews.isTVSelectable(Apple TV only) When set to true, this view will be focusable and navigable using the Apple TV remote. platform ioskeyboardDismissModeDetermines whether the keyboard gets dismissed in response to a drag. - 'none' (the default) drags do not dismiss the keyboard. - 'onDrag' the keyboard is dismissed when a drag begins. - 'interactive' the keyboard is dismissed interactively with the drag and moves in synchrony with the touch; dragging upwards cancels the dismissal.keyboardShouldPersistTapsDetermines when the keyboard should stay visible after a tap. - 'never' (the default), tapping outside of the focused text input when the keyboard is up dismisses the keyboard. When this happens, children won't receive the tap. - 'always', the keyboard will not dismiss automatically, and the scroll view will not catch taps, but children of the scroll view can catch taps. - 'handled', the keyboard will not dismiss automatically when the tap was handled by a children, (or captured by an ancestor). - false, deprecated, use 'never' instead - true, deprecated, use 'always' insteadmaximumZoomScaleThe maximum allowed zoom scale. The default value is 1.0.minimumZoomScaleThe minimum allowed zoom scale. The default value is 1.0.nativeIDUsed to reference react managed views from native code.needsOffscreenAlphaCompositingWhether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. The default (false) falls back to drawing the component and its children with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. This default may be noticeable and undesired in the case where the View you are setting an opacity on has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background). Rendering offscreen to preserve correct alpha behavior is extremely expensive and hard to debug for non-native developers, which is why it is not turned on by default. If you do need to enable this property for an animation, consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). If that property is enabled, this View will be rendered off-screen once, saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU.nestedScrollEnabledEnables nested scrolling for Android API level 21+. Nested scrolling is supported by default on iOS.onAccessibilityActionWhenaccessibleis true, the system will try to invoke this function when the user performs an accessibility custom action. platform iosonAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonChangeVisibleRows(visibleRows, changedRows) => void Called when the set of visible rows changes.visibleRowsmaps { sectionID: { rowID: true }} for all the visible rows, andchangedRowsmaps { sectionID: { rowID: true | false }} for the rows that have changed their visibility, with true indicating visible, and false indicating the view has moved out of view.onContentSizeChangeCalled when scrollable content view of the ScrollView changes. Handler function is passed the content width and content height as parameters: (contentWidth, contentHeight) It's implemented using onLayout handler attached to the content container which this ScrollView renders.onEndReachedCalled when all rows have been rendered and the list has been scrolled to within onEndReachedThreshold of the bottom. The native scroll event is provided.onEndReachedThresholdThreshold in pixels for onEndReached.onLayoutInvoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height}}}.onMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonMomentumScrollBeginFires when scroll view has begun movingonMomentumScrollEndFires when scroll view has finished movingonMoveShouldSetResponderCalled for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?onMoveShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onResponderEndIf the View returns true and attempts to become the responder, one of the following will happen:onResponderGrantThe View is now responding for touch events. This is the time to highlight and show the user what is happeningonResponderMoveIf the view is responding, the following handlers can be called: The user is moving their fingeronResponderRejectSomething else is the responder right now and will not release itonResponderReleaseFired at the end of the touch, ie "touchUp"onResponderTerminateThe responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationRequest, or might be taken by the OS without asking (happens with control center/ notification center on iOS)onResponderTerminationRequestSomething else wants to become responder. Should this view release the responder? Returning true allows releaseonScrollFires at most once per frame during scrolling. The frequency of the events can be contolled using the scrollEventThrottle prop.onScrollAnimationEndCalled when a scrolling animation ends.onScrollBeginDragFires if a user initiates a scroll gesture.onScrollEndDragFires when a user has finished scrolling.onStartShouldSetResponderA view can become the touch responder by implementing the correct negotiation methods. There are two methods to ask the view if it wants to become responder: Does this view want to become responder on the start of a touch?onStartShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.overScrollModeUsed to override default value of overScroll mode. Possible values: - 'auto' - Default value, allow a user to over-scroll this view only if the content is large enough to meaningfully scroll. - 'always' - Always allow a user to over-scroll this view. - 'never' - Never allow a user to over-scroll this view.pageSizeNumber of rows to render per event loop.pagingEnabledWhen true the scroll view stops on multiples of the scroll view's size when scrolling. This can be used for horizontal pagination. The default value is false.pinchGestureEnabledWhen true, ScrollView allows use of pinch gestures to zoom in and out. The default value is true.pointerEventsIn the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class: .box-none { pointer-events: none; } .box-none * { pointer-events: all; } box-only is the equivalent of .box-only { pointer-events: all; } .box-only * { pointer-events: none; } But since pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform.refreshControlA RefreshControl component, used to provide pull-to-refresh functionality for the ScrollView.removeClippedSubviewsA performance optimization for improving scroll perf of large lists, used in conjunction with overflow: 'hidden' on the row containers. Use at your own risk.renderFooter() => renderable The header and footer are always rendered (if these props are provided) on every render pass. If they are expensive to re-render, wrap them in StaticContainer or other mechanism as appropriate. Footer is always at the bottom of the list, and header at the top, on every render pass.renderHeader() => renderable The header and footer are always rendered (if these props are provided) on every render pass. If they are expensive to re-render, wrap them in StaticContainer or other mechanism as appropriate. Footer is always at the bottom of the list, and header at the top, on every render pass.renderRow(rowData, sectionID, rowID) => renderable Takes a data entry from the data source and its ids and should return a renderable component to be rendered as the row. By default the data is exactly what was put into the data source, but it's also possible to provide custom extractors.renderScrollComponentA function that returns the scrollable component in which the list rows are rendered. Defaults to returning a ScrollView with the given props.renderSectionHeader(sectionData, sectionID) => renderable If provided, a sticky header is rendered for this section. The sticky behavior means that it will scroll with the content at the top of the section until it reaches the top of the screen, at which point it will stick to the top until it is pushed off the screen by the next section header.renderSeparator(sectionID, rowID, adjacentRowHighlighted) => renderable If provided, a renderable component to be rendered as the separator below each row but not the last row if there is a section header below. Take a sectionID and rowID of the row above and whether its adjacent row is highlighted.renderToHardwareTextureAndroidWhether this view should render itself (and all of its children) into a single hardware texture on the GPU. On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation.scrollEnabledWhen false, the content does not scroll. The default value is truescrollEventThrottleThis controls how often the scroll event will be fired while scrolling (in events per seconds). A higher number yields better accuracy for code that is tracking the scroll position, but can lead to scroll performance problems due to the volume of information being send over the bridge. The default value is zero, which means the scroll event will be sent only once each time the view is scrolled.scrollIndicatorInsetsThe amount by which the scroll view indicators are inset from the edges of the scroll view. This should normally be set to the same value as the contentInset. Defaults to {0, 0, 0, 0}.scrollPerfTagTag used to log scroll performance on this scroll view. Will force momentum events to be turned on (see sendMomentumEvents). This doesn't do anything out of the box and you need to implement a custom native FpsListener for it to be useful. platform androidscrollRenderAheadDistanceHow early to start rendering rows before they come on screen, in pixels.scrollsToTopWhen true the scroll view scrolls to top when the status bar is tapped. The default value is true.shouldRasterizeIOSWhether this view should be rendered as a bitmap before compositing. On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view and quickly composite it during each frame. Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. Test and measure when using this property.showsHorizontalScrollIndicatorWhen true, shows a horizontal scroll indicator.showsVerticalScrollIndicatorWhen true, shows a vertical scroll indicator.snapToAlignmentWhensnapToIntervalis set,snapToAlignmentwill define the relationship of the the snapping to the scroll view. -start(the default) will align the snap at the left (horizontal) or top (vertical) -centerwill align the snap in the center -endwill align the snap at the right (horizontal) or bottom (vertical)snapToEndUse in conjuction withsnapToOffsets. By default, the end of the list counts as a snap offset. SetsnapToEndto false to disable this behavior and allow the list to scroll freely between its end and the lastsnapToOffsetsoffset. The default value is true.snapToIntervalWhen set, causes the scroll view to stop at multiples of the value ofsnapToInterval. This can be used for paginating through children that have lengths smaller than the scroll view. Used in combination withsnapToAlignmentanddecelerationRate="fast". Overrides less configurablepagingEnabledprop.snapToOffsetsWhen set, causes the scroll view to stop at the defined offsets. This can be used for paginating through variously sized children that have lengths smaller than the scroll view. Typically used in combination withdecelerationRate="fast". Overrides less configurablepagingEnabledandsnapToIntervalprops.snapToStartUse in conjuction withsnapToOffsets. By default, the beginning of the list counts as a snap offset. SetsnapToStartto false to disable this behavior and allow the list to scroll freely between its start and the firstsnapToOffsetsoffset. The default value is true.stickyHeaderIndicesAn array of child indices determining which children get docked to the top of the screen when scrolling. For example, passingstickyHeaderIndices={[0]}will cause the first child to be fixed to the top of the scroll view. This property is not supported in conjunction withhorizontal={true}. platform iosstickySectionHeadersEnabledMakes the sections headers sticky. The sticky behavior means that it will scroll with the content at the top of the section until it reaches the top of the screen, at which point it will stick to the top until it is pushed off the screen by the next section header. This property is not supported in conjunction withhorizontal={true}. Only enabled by default on iOS because of typical platform standards.styleStyletestIDUsed to locate this view in end-to-end tests.tvParallaxMagnification(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 1.0. platform iostvParallaxProperties(Apple TV only) Object with properties to control Apple TV parallax effects. platform iostvParallaxShiftDistanceX(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxShiftDistanceY(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxTiltAngle(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 0.05. platform ioszoomScaleThe current scale of the scroll view content. The default value is 1.0.
#ListViewProps_optional Source
type ListViewProps_optional = (accessibilityActions :: Array String, accessibilityComponentType :: String, accessibilityElementsHidden :: Boolean, accessibilityHint :: String, accessibilityIgnoresInvertColors :: Boolean, accessibilityLabel :: String, accessibilityLiveRegion :: String, accessibilityRole :: String, accessibilityStates :: Array String, accessibilityTraits :: Array String, accessibilityViewIsModal :: Boolean, accessible :: Boolean, alwaysBounceHorizontal :: Boolean, alwaysBounceVertical :: Boolean, automaticallyAdjustContentInsets :: Boolean, bounces :: Boolean, bouncesZoom :: Boolean, canCancelContentTouches :: Boolean, centerContent :: Boolean, children :: Array JSX, collapsable :: Boolean, contentContainerStyle :: CSS, contentInset :: Insets, contentInsetAdjustmentBehavior :: String, contentOffset :: PointPropType, decelerationRate :: String, directionalLockEnabled :: Boolean, enableEmptySections :: Boolean, endFillColor :: String, hasTVPreferredFocus :: Boolean, hitSlop :: Insets, horizontal :: Boolean, importantForAccessibility :: String, indicatorStyle :: String, initialListSize :: Number, invertStickyHeaders :: Boolean, isTVSelectable :: Boolean, key :: String, keyboardDismissMode :: String, keyboardShouldPersistTaps :: String, maximumZoomScale :: Number, minimumZoomScale :: Number, nativeID :: String, needsOffscreenAlphaCompositing :: Boolean, nestedScrollEnabled :: Boolean, onAccessibilityAction :: Effect Unit, onAccessibilityTap :: Effect Unit, onChangeVisibleRows :: EffectFn2 (Array (Object Foreign)) (Array (Object Foreign)) Unit, onContentSizeChange :: EffectFn2 Number Number Unit, onEndReached :: Effect Unit, onEndReachedThreshold :: Number, onLayout :: EffectFn1 LayoutChangeEvent Unit, onMagicTap :: Effect Unit, onMomentumScrollBegin :: EffectFn1 (NativeSyntheticEvent NativeScrollEvent) Unit, onMomentumScrollEnd :: EffectFn1 (NativeSyntheticEvent NativeScrollEvent) Unit, onMoveShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onMoveShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onResponderEnd :: EffectFn1 GestureResponderEvent Unit, onResponderGrant :: EffectFn1 GestureResponderEvent Unit, onResponderMove :: EffectFn1 GestureResponderEvent Unit, onResponderReject :: EffectFn1 GestureResponderEvent Unit, onResponderRelease :: EffectFn1 GestureResponderEvent Unit, onResponderStart :: EffectFn1 GestureResponderEvent Unit, onResponderTerminate :: EffectFn1 GestureResponderEvent Unit, onResponderTerminationRequest :: EffectFn1 GestureResponderEvent Boolean, onScroll :: EffectFn1 (NativeSyntheticEvent NativeScrollEvent) Unit, onScrollAnimationEnd :: Effect Unit, onScrollBeginDrag :: EffectFn1 (NativeSyntheticEvent NativeScrollEvent) Unit, onScrollEndDrag :: EffectFn1 (NativeSyntheticEvent NativeScrollEvent) Unit, onStartShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onTouchCancel :: EffectFn1 GestureResponderEvent Unit, onTouchEnd :: EffectFn1 GestureResponderEvent Unit, onTouchEndCapture :: EffectFn1 GestureResponderEvent Unit, onTouchMove :: EffectFn1 GestureResponderEvent Unit, onTouchStart :: EffectFn1 GestureResponderEvent Unit, overScrollMode :: String, pageSize :: Number, pagingEnabled :: Boolean, pinchGestureEnabled :: Boolean, pointerEvents :: String, refreshControl :: JSX, removeClippedSubviews :: Boolean, renderFooter :: Effect JSX, renderHeader :: Effect JSX, renderScrollComponent :: EffectFn1 (Record ScrollViewProps) JSX, renderSectionHeader :: EffectFn2 Foreign String JSX, renderSeparator :: EffectFn3 String String Boolean JSX, renderToHardwareTextureAndroid :: Boolean, scrollEnabled :: Boolean, scrollEventThrottle :: Number, scrollIndicatorInsets :: Insets, scrollPerfTag :: String, scrollRenderAheadDistance :: Number, scrollsToTop :: Boolean, shouldRasterizeIOS :: Boolean, showsHorizontalScrollIndicator :: Boolean, showsVerticalScrollIndicator :: Boolean, snapToAlignment :: String, snapToEnd :: Boolean, snapToInterval :: Number, snapToOffsets :: Array Number, snapToStart :: Boolean, stickyHeaderIndices :: Array Number, stickySectionHeadersEnabled :: Boolean, style :: CSS, testID :: String, tvParallaxMagnification :: Number, tvParallaxProperties :: { enabled :: Boolean, magnification :: Number, pressDelay :: Number, pressDuration :: Number, pressMagnification :: Number, shiftDistanceX :: Number, shiftDistanceY :: Number, tiltAngle :: Number }, tvParallaxShiftDistanceX :: Number, tvParallaxShiftDistanceY :: Number, tvParallaxTiltAngle :: Number, zoomScale :: Number)see https://facebook.github.io/react-native/docs/listview.html#props
accessibilityActionsProvides an array of custom actions available for accessibility. platform iosaccessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibilityViewIsModalA Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.alwaysBounceHorizontalWhen true the scroll view bounces horizontally when it reaches the end even if the content is smaller than the scroll view itself. The default value is true whenhorizontal={true}and false otherwise.alwaysBounceVerticalWhen true the scroll view bounces vertically when it reaches the end even if the content is smaller than the scroll view itself. The default value is false whenhorizontal={true}and true otherwise.automaticallyAdjustContentInsetsControls whether iOS should automatically adjust the content inset for scroll views that are placed behind a navigation bar or tab bar/ toolbar. The default value is true.bouncesWhen true the scroll view bounces when it reaches the end of the content if the content is larger then the scroll view along the axis of the scroll direction. When false it disables all bouncing even if thealwaysBounce*props are true. The default value is true.bouncesZoomWhen true gestures can drive zoom past min/max and the zoom will animate to the min/max value at gesture end otherwise the zoom will not exceed the limits.canCancelContentTouchesWhen false once tracking starts won't try to drag if the touch moves. The default value is true.centerContentWhen true the scroll view automatically centers the content when the content is smaller than the scroll view bounds; when the content is larger than the scroll view this property has no effect. The default value is false.collapsableViews that are only used to layout their children or otherwise don't draw anything may be automatically removed from the native hierarchy as an optimization. Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.contentContainerStyleThese styles will be applied to the scroll view content container which wraps all of the child views. Example: return ( <ScrollView contentContainerStyle={styles.contentContainer}> </ScrollView> ); ... const styles = StyleSheet.create({ contentContainer: { paddingVertical: 20 } });contentInsetThe amount by which the scroll view content is inset from the edges of the scroll view. Defaults to {0, 0, 0, 0}.contentInsetAdjustmentBehaviorThis property specifies how the safe area insets are used to modify the content area of the scroll view. The default value of this property must be 'automatic'. But the default value is 'never' until RN@0.51.contentOffsetUsed to manually set the starting scroll offset. The default value is {x: 0, y: 0}dataSourceAn instance of ListView.DataSource to usedecelerationRateA floating-point number that determines how quickly the scroll view decelerates after the user lifts their finger. Reasonable choices include - Normal: 0.998 (the default) - Fast: 0.9directionalLockEnabledWhen true the ScrollView will try to lock to only vertical or horizontal scrolling while dragging. The default value is false.enableEmptySectionsFlag indicating whether empty section headers should be rendered. In the future release empty section headers will be rendered by default, and the flag will be deprecated. If empty sections are not desired to be rendered their indices should be excluded from sectionID object.endFillColorSometimes a scrollview takes up more space than its content fills. When this is the case, this prop will fill the rest of the scrollview with a color to avoid setting a background and creating unnecessary overdraw. This is an advanced optimization that is not needed in the general case.hasTVPreferredFocus(Apple TV only) May be set to true to force the Apple TV focus engine to move focus to this view. platform ioshitSlopThis defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets that are at least 30 - 40 points/density-independent pixels. If a Touchable view has a height of 20 the touchable height can be extended to 40 with hitSlop={{top: 10, bottom: 10, left: 0, right: 0}} NOTE The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.horizontalWhen true the scroll view's children are arranged horizontally in a row instead of vertically in a column. The default value is false.importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.indicatorStyleThe style of the scroll indicators. - default (the default), same as black. - black, scroll indicator is black. This style is good against a white content background. - white, scroll indicator is white. This style is good against a black content background.initialListSizeHow many rows to render on initial component mount. Use this to make it so that the first screen worth of data apears at one time instead of over the course of multiple frames.invertStickyHeadersIf sticky headers should stick at the bottom instead of the top of the ScrollView. This is usually used with inverted ScrollViews.isTVSelectable(Apple TV only) When set to true, this view will be focusable and navigable using the Apple TV remote. platform ioskeyboardDismissModeDetermines whether the keyboard gets dismissed in response to a drag. - 'none' (the default) drags do not dismiss the keyboard. - 'onDrag' the keyboard is dismissed when a drag begins. - 'interactive' the keyboard is dismissed interactively with the drag and moves in synchrony with the touch; dragging upwards cancels the dismissal.keyboardShouldPersistTapsDetermines when the keyboard should stay visible after a tap. - 'never' (the default), tapping outside of the focused text input when the keyboard is up dismisses the keyboard. When this happens, children won't receive the tap. - 'always', the keyboard will not dismiss automatically, and the scroll view will not catch taps, but children of the scroll view can catch taps. - 'handled', the keyboard will not dismiss automatically when the tap was handled by a children, (or captured by an ancestor). - false, deprecated, use 'never' instead - true, deprecated, use 'always' insteadmaximumZoomScaleThe maximum allowed zoom scale. The default value is 1.0.minimumZoomScaleThe minimum allowed zoom scale. The default value is 1.0.nativeIDUsed to reference react managed views from native code.needsOffscreenAlphaCompositingWhether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. The default (false) falls back to drawing the component and its children with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. This default may be noticeable and undesired in the case where the View you are setting an opacity on has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background). Rendering offscreen to preserve correct alpha behavior is extremely expensive and hard to debug for non-native developers, which is why it is not turned on by default. If you do need to enable this property for an animation, consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). If that property is enabled, this View will be rendered off-screen once, saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU.nestedScrollEnabledEnables nested scrolling for Android API level 21+. Nested scrolling is supported by default on iOS.onAccessibilityActionWhenaccessibleis true, the system will try to invoke this function when the user performs an accessibility custom action. platform iosonAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonChangeVisibleRows(visibleRows, changedRows) => void Called when the set of visible rows changes.visibleRowsmaps { sectionID: { rowID: true }} for all the visible rows, andchangedRowsmaps { sectionID: { rowID: true | false }} for the rows that have changed their visibility, with true indicating visible, and false indicating the view has moved out of view.onContentSizeChangeCalled when scrollable content view of the ScrollView changes. Handler function is passed the content width and content height as parameters: (contentWidth, contentHeight) It's implemented using onLayout handler attached to the content container which this ScrollView renders.onEndReachedCalled when all rows have been rendered and the list has been scrolled to within onEndReachedThreshold of the bottom. The native scroll event is provided.onEndReachedThresholdThreshold in pixels for onEndReached.onLayoutInvoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height}}}.onMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonMomentumScrollBeginFires when scroll view has begun movingonMomentumScrollEndFires when scroll view has finished movingonMoveShouldSetResponderCalled for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?onMoveShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onResponderEndIf the View returns true and attempts to become the responder, one of the following will happen:onResponderGrantThe View is now responding for touch events. This is the time to highlight and show the user what is happeningonResponderMoveIf the view is responding, the following handlers can be called: The user is moving their fingeronResponderRejectSomething else is the responder right now and will not release itonResponderReleaseFired at the end of the touch, ie "touchUp"onResponderTerminateThe responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationRequest, or might be taken by the OS without asking (happens with control center/ notification center on iOS)onResponderTerminationRequestSomething else wants to become responder. Should this view release the responder? Returning true allows releaseonScrollFires at most once per frame during scrolling. The frequency of the events can be contolled using the scrollEventThrottle prop.onScrollAnimationEndCalled when a scrolling animation ends.onScrollBeginDragFires if a user initiates a scroll gesture.onScrollEndDragFires when a user has finished scrolling.onStartShouldSetResponderA view can become the touch responder by implementing the correct negotiation methods. There are two methods to ask the view if it wants to become responder: Does this view want to become responder on the start of a touch?onStartShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.overScrollModeUsed to override default value of overScroll mode. Possible values: - 'auto' - Default value, allow a user to over-scroll this view only if the content is large enough to meaningfully scroll. - 'always' - Always allow a user to over-scroll this view. - 'never' - Never allow a user to over-scroll this view.pageSizeNumber of rows to render per event loop.pagingEnabledWhen true the scroll view stops on multiples of the scroll view's size when scrolling. This can be used for horizontal pagination. The default value is false.pinchGestureEnabledWhen true, ScrollView allows use of pinch gestures to zoom in and out. The default value is true.pointerEventsIn the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class: .box-none { pointer-events: none; } .box-none * { pointer-events: all; } box-only is the equivalent of .box-only { pointer-events: all; } .box-only * { pointer-events: none; } But since pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform.refreshControlA RefreshControl component, used to provide pull-to-refresh functionality for the ScrollView.removeClippedSubviewsA performance optimization for improving scroll perf of large lists, used in conjunction with overflow: 'hidden' on the row containers. Use at your own risk.renderFooter() => renderable The header and footer are always rendered (if these props are provided) on every render pass. If they are expensive to re-render, wrap them in StaticContainer or other mechanism as appropriate. Footer is always at the bottom of the list, and header at the top, on every render pass.renderHeader() => renderable The header and footer are always rendered (if these props are provided) on every render pass. If they are expensive to re-render, wrap them in StaticContainer or other mechanism as appropriate. Footer is always at the bottom of the list, and header at the top, on every render pass.renderRow(rowData, sectionID, rowID) => renderable Takes a data entry from the data source and its ids and should return a renderable component to be rendered as the row. By default the data is exactly what was put into the data source, but it's also possible to provide custom extractors.renderScrollComponentA function that returns the scrollable component in which the list rows are rendered. Defaults to returning a ScrollView with the given props.renderSectionHeader(sectionData, sectionID) => renderable If provided, a sticky header is rendered for this section. The sticky behavior means that it will scroll with the content at the top of the section until it reaches the top of the screen, at which point it will stick to the top until it is pushed off the screen by the next section header.renderSeparator(sectionID, rowID, adjacentRowHighlighted) => renderable If provided, a renderable component to be rendered as the separator below each row but not the last row if there is a section header below. Take a sectionID and rowID of the row above and whether its adjacent row is highlighted.renderToHardwareTextureAndroidWhether this view should render itself (and all of its children) into a single hardware texture on the GPU. On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation.scrollEnabledWhen false, the content does not scroll. The default value is truescrollEventThrottleThis controls how often the scroll event will be fired while scrolling (in events per seconds). A higher number yields better accuracy for code that is tracking the scroll position, but can lead to scroll performance problems due to the volume of information being send over the bridge. The default value is zero, which means the scroll event will be sent only once each time the view is scrolled.scrollIndicatorInsetsThe amount by which the scroll view indicators are inset from the edges of the scroll view. This should normally be set to the same value as the contentInset. Defaults to {0, 0, 0, 0}.scrollPerfTagTag used to log scroll performance on this scroll view. Will force momentum events to be turned on (see sendMomentumEvents). This doesn't do anything out of the box and you need to implement a custom native FpsListener for it to be useful. platform androidscrollRenderAheadDistanceHow early to start rendering rows before they come on screen, in pixels.scrollsToTopWhen true the scroll view scrolls to top when the status bar is tapped. The default value is true.shouldRasterizeIOSWhether this view should be rendered as a bitmap before compositing. On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view and quickly composite it during each frame. Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. Test and measure when using this property.showsHorizontalScrollIndicatorWhen true, shows a horizontal scroll indicator.showsVerticalScrollIndicatorWhen true, shows a vertical scroll indicator.snapToAlignmentWhensnapToIntervalis set,snapToAlignmentwill define the relationship of the the snapping to the scroll view. -start(the default) will align the snap at the left (horizontal) or top (vertical) -centerwill align the snap in the center -endwill align the snap at the right (horizontal) or bottom (vertical)snapToEndUse in conjuction withsnapToOffsets. By default, the end of the list counts as a snap offset. SetsnapToEndto false to disable this behavior and allow the list to scroll freely between its end and the lastsnapToOffsetsoffset. The default value is true.snapToIntervalWhen set, causes the scroll view to stop at multiples of the value ofsnapToInterval. This can be used for paginating through children that have lengths smaller than the scroll view. Used in combination withsnapToAlignmentanddecelerationRate="fast". Overrides less configurablepagingEnabledprop.snapToOffsetsWhen set, causes the scroll view to stop at the defined offsets. This can be used for paginating through variously sized children that have lengths smaller than the scroll view. Typically used in combination withdecelerationRate="fast". Overrides less configurablepagingEnabledandsnapToIntervalprops.snapToStartUse in conjuction withsnapToOffsets. By default, the beginning of the list counts as a snap offset. SetsnapToStartto false to disable this behavior and allow the list to scroll freely between its start and the firstsnapToOffsetsoffset. The default value is true.stickyHeaderIndicesAn array of child indices determining which children get docked to the top of the screen when scrolling. For example, passingstickyHeaderIndices={[0]}will cause the first child to be fixed to the top of the scroll view. This property is not supported in conjunction withhorizontal={true}. platform iosstickySectionHeadersEnabledMakes the sections headers sticky. The sticky behavior means that it will scroll with the content at the top of the section until it reaches the top of the screen, at which point it will stick to the top until it is pushed off the screen by the next section header. This property is not supported in conjunction withhorizontal={true}. Only enabled by default on iOS because of typical platform standards.styleStyletestIDUsed to locate this view in end-to-end tests.tvParallaxMagnification(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 1.0. platform iostvParallaxProperties(Apple TV only) Object with properties to control Apple TV parallax effects. platform iostvParallaxShiftDistanceX(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxShiftDistanceY(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxTiltAngle(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 0.05. platform ioszoomScaleThe current scale of the scroll view content. The default value is 1.0.
#ListViewDataSource Source
data ListViewDataSource :: Type#LayoutRectangle Source
type LayoutRectangle = { height :: Number, width :: Number, x :: Number, y :: Number }#LayoutChangeEvent Source
type LayoutChangeEvent = { nativeEvent :: { layout :: LayoutRectangle } }#KeyboardAvoidingViewProps Source
type KeyboardAvoidingViewProps = (accessibilityActions :: Array String, accessibilityComponentType :: String, accessibilityElementsHidden :: Boolean, accessibilityHint :: String, accessibilityIgnoresInvertColors :: Boolean, accessibilityLabel :: String, accessibilityLiveRegion :: String, accessibilityRole :: String, accessibilityStates :: Array String, accessibilityTraits :: Array String, accessibilityViewIsModal :: Boolean, accessible :: Boolean, behavior :: String, children :: Array JSX, collapsable :: Boolean, contentContainerStyle :: CSS, enabled :: Boolean, hasTVPreferredFocus :: Boolean, hitSlop :: Insets, importantForAccessibility :: String, isTVSelectable :: Boolean, key :: String, keyboardVerticalOffset :: Number, nativeID :: String, needsOffscreenAlphaCompositing :: Boolean, onAccessibilityAction :: Effect Unit, onAccessibilityTap :: Effect Unit, onLayout :: EffectFn1 LayoutChangeEvent Unit, onMagicTap :: Effect Unit, onMoveShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onMoveShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onResponderEnd :: EffectFn1 GestureResponderEvent Unit, onResponderGrant :: EffectFn1 GestureResponderEvent Unit, onResponderMove :: EffectFn1 GestureResponderEvent Unit, onResponderReject :: EffectFn1 GestureResponderEvent Unit, onResponderRelease :: EffectFn1 GestureResponderEvent Unit, onResponderStart :: EffectFn1 GestureResponderEvent Unit, onResponderTerminate :: EffectFn1 GestureResponderEvent Unit, onResponderTerminationRequest :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onTouchCancel :: EffectFn1 GestureResponderEvent Unit, onTouchEnd :: EffectFn1 GestureResponderEvent Unit, onTouchEndCapture :: EffectFn1 GestureResponderEvent Unit, onTouchMove :: EffectFn1 GestureResponderEvent Unit, onTouchStart :: EffectFn1 GestureResponderEvent Unit, pointerEvents :: String, removeClippedSubviews :: Boolean, renderToHardwareTextureAndroid :: Boolean, shouldRasterizeIOS :: Boolean, style :: CSS, testID :: String, tvParallaxMagnification :: Number, tvParallaxProperties :: { enabled :: Boolean, magnification :: Number, pressDelay :: Number, pressDuration :: Number, pressMagnification :: Number, shiftDistanceX :: Number, shiftDistanceY :: Number, tiltAngle :: Number }, tvParallaxShiftDistanceX :: Number, tvParallaxShiftDistanceY :: Number, tvParallaxTiltAngle :: Number)accessibilityActionsProvides an array of custom actions available for accessibility. platform iosaccessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibilityViewIsModalA Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.collapsableViews that are only used to layout their children or otherwise don't draw anything may be automatically removed from the native hierarchy as an optimization. Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.contentContainerStyleThe style of the content container(View) when behavior is 'position'.enabledEnables or disables the KeyboardAvoidingView. Default is truehasTVPreferredFocus(Apple TV only) May be set to true to force the Apple TV focus engine to move focus to this view. platform ioshitSlopThis defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets that are at least 30 - 40 points/density-independent pixels. If a Touchable view has a height of 20 the touchable height can be extended to 40 with hitSlop={{top: 10, bottom: 10, left: 0, right: 0}} NOTE The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.isTVSelectable(Apple TV only) When set to true, this view will be focusable and navigable using the Apple TV remote. platform ioskeyboardVerticalOffsetThis is the distance between the top of the user screen and the react native view, may be non-zero in some use cases.nativeIDUsed to reference react managed views from native code.needsOffscreenAlphaCompositingWhether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. The default (false) falls back to drawing the component and its children with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. This default may be noticeable and undesired in the case where the View you are setting an opacity on has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background). Rendering offscreen to preserve correct alpha behavior is extremely expensive and hard to debug for non-native developers, which is why it is not turned on by default. If you do need to enable this property for an animation, consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). If that property is enabled, this View will be rendered off-screen once, saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU.onAccessibilityActionWhenaccessibleis true, the system will try to invoke this function when the user performs an accessibility custom action. platform iosonAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonLayoutInvoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height}}}.onMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonMoveShouldSetResponderCalled for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?onMoveShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onResponderEndIf the View returns true and attempts to become the responder, one of the following will happen:onResponderGrantThe View is now responding for touch events. This is the time to highlight and show the user what is happeningonResponderMoveIf the view is responding, the following handlers can be called: The user is moving their fingeronResponderRejectSomething else is the responder right now and will not release itonResponderReleaseFired at the end of the touch, ie "touchUp"onResponderTerminateThe responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationRequest, or might be taken by the OS without asking (happens with control center/ notification center on iOS)onResponderTerminationRequestSomething else wants to become responder. Should this view release the responder? Returning true allows releaseonStartShouldSetResponderA view can become the touch responder by implementing the correct negotiation methods. There are two methods to ask the view if it wants to become responder: Does this view want to become responder on the start of a touch?onStartShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.pointerEventsIn the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class: .box-none { pointer-events: none; } .box-none * { pointer-events: all; } box-only is the equivalent of .box-only { pointer-events: all; } .box-only * { pointer-events: none; } But since pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform.removeClippedSubviewsThis is a special performance property exposed by RCTView and is useful for scrolling content when there are many subviews, most of which are offscreen. For this property to be effective, it must be applied to a view that contains many subviews that extend outside its bound. The subviews must also have overflow: hidden, as should the containing view (or one of its superviews).renderToHardwareTextureAndroidWhether this view should render itself (and all of its children) into a single hardware texture on the GPU. On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation.shouldRasterizeIOSWhether this view should be rendered as a bitmap before compositing. On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view and quickly composite it during each frame. Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. Test and measure when using this property.testIDUsed to locate this view in end-to-end tests.tvParallaxMagnification(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 1.0. platform iostvParallaxProperties(Apple TV only) Object with properties to control Apple TV parallax effects. platform iostvParallaxShiftDistanceX(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxShiftDistanceY(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxTiltAngle(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 0.05. platform ios
#Insets Source
type Insets = { bottom :: Undefinable Number, left :: Undefinable Number, right :: Undefinable Number, top :: Undefinable Number }#ImageURISource Source
type ImageURISource = { body :: Undefinable String, bundle :: Undefinable String, cache :: Undefinable String, headers :: Undefinable (Object Foreign), height :: Undefinable Number, method :: Undefinable String, scale :: Undefinable Number, uri :: Undefinable String, width :: Undefinable Number }#ImageProps_required Source
type ImageProps_required optional = (source :: Array ImageURISource | optional)accessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.blurRadiusblurRadius: the blur radius of the blur filter added to the image platform ioscapInsetsWhen the image is resized, the corners of the size specified by capInsets will stay a fixed size, but the center content and borders of the image will be stretched. This is useful for creating resizable rounded buttons, shadows, and other resizable assets. More info on Apple documentationdefaultSourceA static image to display while downloading the final image off the network.fadeDurationDuration of fade in animation.heightRequired if loading images via 'uri' from drawable folder on Android Explanation: https://medium.com/@adamjacobb/react-native-performance-images-adf5843e120importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.loadingIndicatorSourcesimilarly tosource, this property represents the resource used to render the loading indicator for the image, displayed until image is ready to be displayed, typically after when it got downloaded from network.onAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonErrorInvoked on load error with {nativeEvent: {error}}onLayoutonLayout function Invoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height} }}.onLoadInvoked when load completes successfully { source: { url, height, width } }.onLoadEndInvoked when load either succeeds or failsonLoadStartInvoked on load startonMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonPartialLoadInvoked when a partial load of the image is complete. The definition of what constitutes a "partial load" is loader specific though this is meant for progressive JPEG loads. platform iosonProgressInvoked on download progress with {nativeEvent: {loaded, total}}resizeMethodThe mechanism that should be used to resize the image when the image's dimensions differ from the image view's dimensions. Defaults toauto. -auto: Use heuristics to pick betweenresizeandscale. -resize: A software operation which changes the encoded image in memory before it gets decoded. This should be used instead ofscalewhen the image is much larger than the view. -scale: The image gets drawn downscaled or upscaled. Compared toresize,scaleis faster (usually hardware accelerated) and produces higher quality images. This should be used if the image is smaller than the view. It should also be used if the image is slightly bigger than the view. More details aboutresizeandscalecan be found at http://frescolib.org/docs/resizing-rotating.html. platform androidresizeModeDetermines how to resize the image when the frame doesn't match the raw image dimensions. 'cover': Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image will be equal to or larger than the corresponding dimension of the view (minus padding). 'contain': Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image will be equal to or less than the corresponding dimension of the view (minus padding). 'stretch': Scale width and height independently, This may change the aspect ratio of the src. 'repeat': Repeat the image to cover the frame of the view. The image will keep it's size and aspect ratio. (iOS only) 'center': Scale the image down so that it is completely visible, if bigger than the area of the view. The image will not be scaled up.sourceThe image source (either a remote URL or a local file resource). This prop can also contain several remote URLs, specified together with their width and height and potentially with scale/other URI arguments. The native side will then choose the best uri to display based on the measured size of the image container. A cache property can be added to control how networked request interacts with the local cache. The currently supported formats are png, jpg, jpeg, bmp, gif, webp (Android only), psd (iOS only).styleStyletestIDA unique identifier for this element to be used in UI Automation testing scripts.widthRequired if loading images via 'uri' from drawable folder on Android. Explanation: https://medium.com/@adamjacobb/react-native-performance-images-adf5843e120
#ImageProps_optional Source
type ImageProps_optional = (accessibilityComponentType :: String, accessibilityElementsHidden :: Boolean, accessibilityHint :: String, accessibilityIgnoresInvertColors :: Boolean, accessibilityLabel :: String, accessibilityLiveRegion :: String, accessibilityRole :: String, accessibilityStates :: Array String, accessibilityTraits :: Array String, accessible :: Boolean, blurRadius :: Number, borderBottomLeftRadius :: Number, borderBottomRightRadius :: Number, borderRadius :: Number, borderTopLeftRadius :: Number, borderTopRightRadius :: Number, capInsets :: Insets, children :: Array JSX, defaultSource :: ImageURISource, fadeDuration :: Number, height :: Number, importantForAccessibility :: String, key :: String, loadingIndicatorSource :: ImageURISource, onAccessibilityTap :: Effect Unit, onError :: EffectFn1 (NativeSyntheticEvent ImageErrorEventData) Unit, onLayout :: EffectFn1 LayoutChangeEvent Unit, onLoad :: EffectFn1 (NativeSyntheticEvent ImageLoadEventData) Unit, onLoadEnd :: Effect Unit, onLoadStart :: Effect Unit, onMagicTap :: Effect Unit, onPartialLoad :: Effect Unit, onProgress :: EffectFn1 (NativeSyntheticEvent ImageProgressEventDataIOS) Unit, progressiveRenderingEnabled :: Boolean, resizeMethod :: String, resizeMode :: String, style :: CSS, testID :: String, width :: Number)accessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.blurRadiusblurRadius: the blur radius of the blur filter added to the image platform ioscapInsetsWhen the image is resized, the corners of the size specified by capInsets will stay a fixed size, but the center content and borders of the image will be stretched. This is useful for creating resizable rounded buttons, shadows, and other resizable assets. More info on Apple documentationdefaultSourceA static image to display while downloading the final image off the network.fadeDurationDuration of fade in animation.heightRequired if loading images via 'uri' from drawable folder on Android Explanation: https://medium.com/@adamjacobb/react-native-performance-images-adf5843e120importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.loadingIndicatorSourcesimilarly tosource, this property represents the resource used to render the loading indicator for the image, displayed until image is ready to be displayed, typically after when it got downloaded from network.onAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonErrorInvoked on load error with {nativeEvent: {error}}onLayoutonLayout function Invoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height} }}.onLoadInvoked when load completes successfully { source: { url, height, width } }.onLoadEndInvoked when load either succeeds or failsonLoadStartInvoked on load startonMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonPartialLoadInvoked when a partial load of the image is complete. The definition of what constitutes a "partial load" is loader specific though this is meant for progressive JPEG loads. platform iosonProgressInvoked on download progress with {nativeEvent: {loaded, total}}resizeMethodThe mechanism that should be used to resize the image when the image's dimensions differ from the image view's dimensions. Defaults toauto. -auto: Use heuristics to pick betweenresizeandscale. -resize: A software operation which changes the encoded image in memory before it gets decoded. This should be used instead ofscalewhen the image is much larger than the view. -scale: The image gets drawn downscaled or upscaled. Compared toresize,scaleis faster (usually hardware accelerated) and produces higher quality images. This should be used if the image is smaller than the view. It should also be used if the image is slightly bigger than the view. More details aboutresizeandscalecan be found at http://frescolib.org/docs/resizing-rotating.html. platform androidresizeModeDetermines how to resize the image when the frame doesn't match the raw image dimensions. 'cover': Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image will be equal to or larger than the corresponding dimension of the view (minus padding). 'contain': Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image will be equal to or less than the corresponding dimension of the view (minus padding). 'stretch': Scale width and height independently, This may change the aspect ratio of the src. 'repeat': Repeat the image to cover the frame of the view. The image will keep it's size and aspect ratio. (iOS only) 'center': Scale the image down so that it is completely visible, if bigger than the area of the view. The image will not be scaled up.sourceThe image source (either a remote URL or a local file resource). This prop can also contain several remote URLs, specified together with their width and height and potentially with scale/other URI arguments. The native side will then choose the best uri to display based on the measured size of the image container. A cache property can be added to control how networked request interacts with the local cache. The currently supported formats are png, jpg, jpeg, bmp, gif, webp (Android only), psd (iOS only).styleStyletestIDA unique identifier for this element to be used in UI Automation testing scripts.widthRequired if loading images via 'uri' from drawable folder on Android. Explanation: https://medium.com/@adamjacobb/react-native-performance-images-adf5843e120
#ImageProgressEventDataIOS Source
type ImageProgressEventDataIOS = { loaded :: Number, total :: Number }#ImageLoadEventData Source
type ImageLoadEventData = { source :: { height :: Number, url :: String, width :: Number }, uri :: Undefinable String }#ImageErrorEventData Source
type ImageErrorEventData = { error :: Foreign }#ImageBackgroundProps_required Source
type ImageBackgroundProps_required optional = (source :: Array ImageURISource | optional)accessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.blurRadiusblurRadius: the blur radius of the blur filter added to the image platform ioscapInsetsWhen the image is resized, the corners of the size specified by capInsets will stay a fixed size, but the center content and borders of the image will be stretched. This is useful for creating resizable rounded buttons, shadows, and other resizable assets. More info on Apple documentationdefaultSourceA static image to display while downloading the final image off the network.fadeDurationDuration of fade in animation.heightRequired if loading images via 'uri' from drawable folder on Android Explanation: https://medium.com/@adamjacobb/react-native-performance-images-adf5843e120importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.loadingIndicatorSourcesimilarly tosource, this property represents the resource used to render the loading indicator for the image, displayed until image is ready to be displayed, typically after when it got downloaded from network.onAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonErrorInvoked on load error with {nativeEvent: {error}}onLayoutonLayout function Invoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height} }}.onLoadInvoked when load completes successfully { source: { url, height, width } }.onLoadEndInvoked when load either succeeds or failsonLoadStartInvoked on load startonMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonPartialLoadInvoked when a partial load of the image is complete. The definition of what constitutes a "partial load" is loader specific though this is meant for progressive JPEG loads. platform iosonProgressInvoked on download progress with {nativeEvent: {loaded, total}}resizeMethodThe mechanism that should be used to resize the image when the image's dimensions differ from the image view's dimensions. Defaults toauto. -auto: Use heuristics to pick betweenresizeandscale. -resize: A software operation which changes the encoded image in memory before it gets decoded. This should be used instead ofscalewhen the image is much larger than the view. -scale: The image gets drawn downscaled or upscaled. Compared toresize,scaleis faster (usually hardware accelerated) and produces higher quality images. This should be used if the image is smaller than the view. It should also be used if the image is slightly bigger than the view. More details aboutresizeandscalecan be found at http://frescolib.org/docs/resizing-rotating.html. platform androidresizeModeDetermines how to resize the image when the frame doesn't match the raw image dimensions. 'cover': Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image will be equal to or larger than the corresponding dimension of the view (minus padding). 'contain': Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image will be equal to or less than the corresponding dimension of the view (minus padding). 'stretch': Scale width and height independently, This may change the aspect ratio of the src. 'repeat': Repeat the image to cover the frame of the view. The image will keep it's size and aspect ratio. (iOS only) 'center': Scale the image down so that it is completely visible, if bigger than the area of the view. The image will not be scaled up.sourceThe image source (either a remote URL or a local file resource). This prop can also contain several remote URLs, specified together with their width and height and potentially with scale/other URI arguments. The native side will then choose the best uri to display based on the measured size of the image container. A cache property can be added to control how networked request interacts with the local cache. The currently supported formats are png, jpg, jpeg, bmp, gif, webp (Android only), psd (iOS only).testIDA unique identifier for this element to be used in UI Automation testing scripts.widthRequired if loading images via 'uri' from drawable folder on Android. Explanation: https://medium.com/@adamjacobb/react-native-performance-images-adf5843e120
#ImageBackgroundProps_optional Source
type ImageBackgroundProps_optional = (accessibilityComponentType :: String, accessibilityElementsHidden :: Boolean, accessibilityHint :: String, accessibilityIgnoresInvertColors :: Boolean, accessibilityLabel :: String, accessibilityLiveRegion :: String, accessibilityRole :: String, accessibilityStates :: Array String, accessibilityTraits :: Array String, accessible :: Boolean, blurRadius :: Number, borderBottomLeftRadius :: Number, borderBottomRightRadius :: Number, borderRadius :: Number, borderTopLeftRadius :: Number, borderTopRightRadius :: Number, capInsets :: Insets, children :: Array JSX, defaultSource :: ImageURISource, fadeDuration :: Number, height :: Number, imageStyle :: CSS, importantForAccessibility :: String, key :: String, loadingIndicatorSource :: ImageURISource, onAccessibilityTap :: Effect Unit, onError :: EffectFn1 (NativeSyntheticEvent ImageErrorEventData) Unit, onLayout :: EffectFn1 LayoutChangeEvent Unit, onLoad :: EffectFn1 (NativeSyntheticEvent ImageLoadEventData) Unit, onLoadEnd :: Effect Unit, onLoadStart :: Effect Unit, onMagicTap :: Effect Unit, onPartialLoad :: Effect Unit, onProgress :: EffectFn1 (NativeSyntheticEvent ImageProgressEventDataIOS) Unit, progressiveRenderingEnabled :: Boolean, resizeMethod :: String, resizeMode :: String, style :: CSS, testID :: String, width :: Number)accessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.blurRadiusblurRadius: the blur radius of the blur filter added to the image platform ioscapInsetsWhen the image is resized, the corners of the size specified by capInsets will stay a fixed size, but the center content and borders of the image will be stretched. This is useful for creating resizable rounded buttons, shadows, and other resizable assets. More info on Apple documentationdefaultSourceA static image to display while downloading the final image off the network.fadeDurationDuration of fade in animation.heightRequired if loading images via 'uri' from drawable folder on Android Explanation: https://medium.com/@adamjacobb/react-native-performance-images-adf5843e120importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.loadingIndicatorSourcesimilarly tosource, this property represents the resource used to render the loading indicator for the image, displayed until image is ready to be displayed, typically after when it got downloaded from network.onAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonErrorInvoked on load error with {nativeEvent: {error}}onLayoutonLayout function Invoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height} }}.onLoadInvoked when load completes successfully { source: { url, height, width } }.onLoadEndInvoked when load either succeeds or failsonLoadStartInvoked on load startonMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonPartialLoadInvoked when a partial load of the image is complete. The definition of what constitutes a "partial load" is loader specific though this is meant for progressive JPEG loads. platform iosonProgressInvoked on download progress with {nativeEvent: {loaded, total}}resizeMethodThe mechanism that should be used to resize the image when the image's dimensions differ from the image view's dimensions. Defaults toauto. -auto: Use heuristics to pick betweenresizeandscale. -resize: A software operation which changes the encoded image in memory before it gets decoded. This should be used instead ofscalewhen the image is much larger than the view. -scale: The image gets drawn downscaled or upscaled. Compared toresize,scaleis faster (usually hardware accelerated) and produces higher quality images. This should be used if the image is smaller than the view. It should also be used if the image is slightly bigger than the view. More details aboutresizeandscalecan be found at http://frescolib.org/docs/resizing-rotating.html. platform androidresizeModeDetermines how to resize the image when the frame doesn't match the raw image dimensions. 'cover': Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image will be equal to or larger than the corresponding dimension of the view (minus padding). 'contain': Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image will be equal to or less than the corresponding dimension of the view (minus padding). 'stretch': Scale width and height independently, This may change the aspect ratio of the src. 'repeat': Repeat the image to cover the frame of the view. The image will keep it's size and aspect ratio. (iOS only) 'center': Scale the image down so that it is completely visible, if bigger than the area of the view. The image will not be scaled up.sourceThe image source (either a remote URL or a local file resource). This prop can also contain several remote URLs, specified together with their width and height and potentially with scale/other URI arguments. The native side will then choose the best uri to display based on the measured size of the image container. A cache property can be added to control how networked request interacts with the local cache. The currently supported formats are png, jpg, jpeg, bmp, gif, webp (Android only), psd (iOS only).testIDA unique identifier for this element to be used in UI Automation testing scripts.widthRequired if loading images via 'uri' from drawable folder on Android. Explanation: https://medium.com/@adamjacobb/react-native-performance-images-adf5843e120
#FlatListProps_required Source
type FlatListProps_required itemT optional = (data :: Array itemT, renderItem :: EffectFn1 (ListRenderItemInfo itemT) JSX | optional)ItemSeparatorComponentRendered in between each item, but not at the top or bottomListEmptyComponentRendered when the list is empty.ListFooterComponentRendered at the very end of the list.ListHeaderComponentRendered at the very beginning of the list.accessibilityActionsProvides an array of custom actions available for accessibility. platform iosaccessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibilityViewIsModalA Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.alwaysBounceHorizontalWhen true the scroll view bounces horizontally when it reaches the end even if the content is smaller than the scroll view itself. The default value is true whenhorizontal={true}and false otherwise.alwaysBounceVerticalWhen true the scroll view bounces vertically when it reaches the end even if the content is smaller than the scroll view itself. The default value is false whenhorizontal={true}and true otherwise.automaticallyAdjustContentInsetsControls whether iOS should automatically adjust the content inset for scroll views that are placed behind a navigation bar or tab bar/ toolbar. The default value is true.bouncesWhen true the scroll view bounces when it reaches the end of the content if the content is larger then the scroll view along the axis of the scroll direction. When false it disables all bouncing even if thealwaysBounce*props are true. The default value is true.bouncesZoomWhen true gestures can drive zoom past min/max and the zoom will animate to the min/max value at gesture end otherwise the zoom will not exceed the limits.canCancelContentTouchesWhen false once tracking starts won't try to drag if the touch moves. The default value is true.centerContentWhen true the scroll view automatically centers the content when the content is smaller than the scroll view bounds; when the content is larger than the scroll view this property has no effect. The default value is false.collapsableViews that are only used to layout their children or otherwise don't draw anything may be automatically removed from the native hierarchy as an optimization. Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.columnWrapperStyleOptional custom style for multi-item rows generated when numColumns > 1contentContainerStyleThese styles will be applied to the scroll view content container which wraps all of the child views. Example: return ( <ScrollView contentContainerStyle={styles.contentContainer}> </ScrollView> ); ... const styles = StyleSheet.create({ contentContainer: { paddingVertical: 20 } });contentInsetThe amount by which the scroll view content is inset from the edges of the scroll view. Defaults to {0, 0, 0, 0}.contentInsetAdjustmentBehaviorThis property specifies how the safe area insets are used to modify the content area of the scroll view. The default value of this property must be 'automatic'. But the default value is 'never' until RN@0.51.contentOffsetUsed to manually set the starting scroll offset. The default value is {x: 0, y: 0}dataFor simplicity, data is just a plain array. If you want to use something else, like an immutable list, use the underlying VirtualizedList directly.debugdebugwill turn on extra logging and visual overlays to aid with debugging both usage and implementation, but with a significant perf hit.decelerationRateA floating-point number that determines how quickly the scroll view decelerates after the user lifts their finger. Reasonable choices include - Normal: 0.998 (the default) - Fast: 0.9directionalLockEnabledWhen true the ScrollView will try to lock to only vertical or horizontal scrolling while dragging. The default value is false.disableVirtualizationDEPRECATED: Virtualization provides significant performance and memory optimizations, but fully unmounts react instances that are outside of the render window. You should only need to disable this for debugging purposes.endFillColorSometimes a scrollview takes up more space than its content fills. When this is the case, this prop will fill the rest of the scrollview with a color to avoid setting a background and creating unnecessary overdraw. This is an advanced optimization that is not needed in the general case.extraDataA marker property for telling the list to re-render (since it implements PureComponent). If any of yourrenderItem, Header, Footer, etc. functions depend on anything outside of thedataprop, stick it here and treat it immutably.getItemA generic accessor for extracting an item from any sort of data blob.getItemCountDetermines how many items are in the data blob.getItemLayoutgetItemLayoutis an optional optimization that lets us skip measurement of dynamic content if you know the height of items a priori. getItemLayout is the most efficient, and is easy to use if you have fixed height items, for example:* getItemLayout={(data, index) => ( * {length: ITEM_HEIGHT, offset: ITEM_HEIGHT * index, index} * )} *Remember to include separator length (height or width) in your offset calculation if you specifyItemSeparatorComponent.hasTVPreferredFocus(Apple TV only) May be set to true to force the Apple TV focus engine to move focus to this view. platform ioshitSlopThis defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets that are at least 30 - 40 points/density-independent pixels. If a Touchable view has a height of 20 the touchable height can be extended to 40 with hitSlop={{top: 10, bottom: 10, left: 0, right: 0}} NOTE The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.horizontalIf true, renders items next to each other horizontally instead of stacked vertically.importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.indicatorStyleThe style of the scroll indicators. - default (the default), same as black. - black, scroll indicator is black. This style is good against a white content background. - white, scroll indicator is white. This style is good against a black content background.initialNumToRenderHow many items to render in the initial batchinitialScrollIndexInstead of starting at the top with the first item, start at initialScrollIndexinvertStickyHeadersIf sticky headers should stick at the bottom instead of the top of the ScrollView. This is usually used with inverted ScrollViews.invertedReverses the direction of scroll. Uses scale transforms of -1.isTVSelectable(Apple TV only) When set to true, this view will be focusable and navigable using the Apple TV remote. platform ioskeyExtractorUsed to extract a unique key for a given item at the specified index. Key is used for caching and as the react key to track item re-ordering. The default extractor checksitem.key, then falls back to using the index, like React does.keyboardDismissModeDetermines whether the keyboard gets dismissed in response to a drag. - 'none' (the default) drags do not dismiss the keyboard. - 'onDrag' the keyboard is dismissed when a drag begins. - 'interactive' the keyboard is dismissed interactively with the drag and moves in synchrony with the touch; dragging upwards cancels the dismissal.keyboardShouldPersistTapsDetermines when the keyboard should stay visible after a tap. - 'never' (the default), tapping outside of the focused text input when the keyboard is up dismisses the keyboard. When this happens, children won't receive the tap. - 'always', the keyboard will not dismiss automatically, and the scroll view will not catch taps, but children of the scroll view can catch taps. - 'handled', the keyboard will not dismiss automatically when the tap was handled by a children, (or captured by an ancestor). - false, deprecated, use 'never' instead - true, deprecated, use 'always' insteadlegacyImplementationUses legacy MetroListView instead of default VirtualizedSectionListmaxToRenderPerBatchThe maximum number of items to render in each incremental render batch. The more rendered at once, the better the fill rate, but responsiveness my suffer because rendering content may interfere with responding to button taps or other interactions.maximumZoomScaleThe maximum allowed zoom scale. The default value is 1.0.minimumZoomScaleThe minimum allowed zoom scale. The default value is 1.0.nativeIDUsed to reference react managed views from native code.needsOffscreenAlphaCompositingWhether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. The default (false) falls back to drawing the component and its children with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. This default may be noticeable and undesired in the case where the View you are setting an opacity on has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background). Rendering offscreen to preserve correct alpha behavior is extremely expensive and hard to debug for non-native developers, which is why it is not turned on by default. If you do need to enable this property for an animation, consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). If that property is enabled, this View will be rendered off-screen once, saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU.nestedScrollEnabledEnables nested scrolling for Android API level 21+. Nested scrolling is supported by default on iOS.numColumnsMultiple columns can only be rendered withhorizontal={false}and will zig-zag like aflexWraplayout. Items should all be the same height - masonry layouts are not supported.onAccessibilityActionWhenaccessibleis true, the system will try to invoke this function when the user performs an accessibility custom action. platform iosonAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonContentSizeChangeCalled when scrollable content view of the ScrollView changes. Handler function is passed the content width and content height as parameters: (contentWidth, contentHeight) It's implemented using onLayout handler attached to the content container which this ScrollView renders.onEndReachedCalled once when the scroll position gets within onEndReachedThreshold of the rendered content.onEndReachedThresholdHow far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger theonEndReachedcallback. Thus a value of 0.5 will triggeronEndReachedwhen the end of the content is within half the visible length of the list.onMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonMomentumScrollBeginFires when scroll view has begun movingonMomentumScrollEndFires when scroll view has finished movingonMoveShouldSetResponderCalled for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?onMoveShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onRefreshIf provided, a standard RefreshControl will be added for "Pull to Refresh" functionality. Make sure to also set the refreshing prop correctly.onResponderEndIf the View returns true and attempts to become the responder, one of the following will happen:onResponderGrantThe View is now responding for touch events. This is the time to highlight and show the user what is happeningonResponderMoveIf the view is responding, the following handlers can be called: The user is moving their fingeronResponderRejectSomething else is the responder right now and will not release itonResponderReleaseFired at the end of the touch, ie "touchUp"onResponderTerminateThe responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationRequest, or might be taken by the OS without asking (happens with control center/ notification center on iOS)onResponderTerminationRequestSomething else wants to become responder. Should this view release the responder? Returning true allows releaseonScrollFires at most once per frame during scrolling. The frequency of the events can be contolled using the scrollEventThrottle prop.onScrollAnimationEndCalled when a scrolling animation ends.onScrollBeginDragFires if a user initiates a scroll gesture.onScrollEndDragFires when a user has finished scrolling.onScrollToIndexFailedUsed to handle failures when scrolling to an index that has not been measured yet. Recommended action is to either compute your own offset andscrollToit, or scroll as far as possible and then try again after more items have been rendered.onStartShouldSetResponderA view can become the touch responder by implementing the correct negotiation methods. There are two methods to ask the view if it wants to become responder: Does this view want to become responder on the start of a touch?onStartShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onViewableItemsChangedCalled when the viewability of rows changes, as defined by theviewablePercentThresholdprop.overScrollModeUsed to override default value of overScroll mode. Possible values: - 'auto' - Default value, allow a user to over-scroll this view only if the content is large enough to meaningfully scroll. - 'always' - Always allow a user to over-scroll this view. - 'never' - Never allow a user to over-scroll this view.pagingEnabledWhen true the scroll view stops on multiples of the scroll view's size when scrolling. This can be used for horizontal pagination. The default value is false.pinchGestureEnabledWhen true, ScrollView allows use of pinch gestures to zoom in and out. The default value is true.pointerEventsIn the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class: .box-none { pointer-events: none; } .box-none * { pointer-events: all; } box-only is the equivalent of .box-only { pointer-events: all; } .box-only * { pointer-events: none; } But since pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform.progressViewOffsetSet this when offset is needed for the loading indicator to show correctly. platform androidrefreshControlA RefreshControl component, used to provide pull-to-refresh functionality for the ScrollView.refreshingSet this true while waiting for new data from a refresh.removeClippedSubviewsNote: may have bugs (missing content) in some circumstances - use at your own risk. This may improve scroll performance for large lists.renderItemTakes an item from data and renders it into the list. Typical usage:* _renderItem = ({item}) => ( * <TouchableOpacity onPress={() => this._onPress(item)}> * <Text>{item.title}</Text> * <TouchableOpacity/> * ); * ... * <FlatList data={[{title: 'Title Text', key: 'item1'}]} renderItem={this._renderItem} /> *Provides additional metadata likeindexif you need it.renderScrollComponentRender a custom scroll component, e.g. with a differently styledRefreshControl.renderToHardwareTextureAndroidWhether this view should render itself (and all of its children) into a single hardware texture on the GPU. On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation.scrollEnabledWhen false, the content does not scroll. The default value is truescrollEventThrottleThis controls how often the scroll event will be fired while scrolling (in events per seconds). A higher number yields better accuracy for code that is tracking the scroll position, but can lead to scroll performance problems due to the volume of information being send over the bridge. The default value is zero, which means the scroll event will be sent only once each time the view is scrolled.scrollIndicatorInsetsThe amount by which the scroll view indicators are inset from the edges of the scroll view. This should normally be set to the same value as the contentInset. Defaults to {0, 0, 0, 0}.scrollPerfTagTag used to log scroll performance on this scroll view. Will force momentum events to be turned on (see sendMomentumEvents). This doesn't do anything out of the box and you need to implement a custom native FpsListener for it to be useful. platform androidscrollsToTopWhen true the scroll view scrolls to top when the status bar is tapped. The default value is true.shouldRasterizeIOSWhether this view should be rendered as a bitmap before compositing. On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view and quickly composite it during each frame. Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. Test and measure when using this property.showsHorizontalScrollIndicatorWhen true, shows a horizontal scroll indicator.showsVerticalScrollIndicatorWhen true, shows a vertical scroll indicator.snapToAlignmentWhensnapToIntervalis set,snapToAlignmentwill define the relationship of the the snapping to the scroll view. -start(the default) will align the snap at the left (horizontal) or top (vertical) -centerwill align the snap in the center -endwill align the snap at the right (horizontal) or bottom (vertical)snapToEndUse in conjuction withsnapToOffsets. By default, the end of the list counts as a snap offset. SetsnapToEndto false to disable this behavior and allow the list to scroll freely between its end and the lastsnapToOffsetsoffset. The default value is true.snapToIntervalWhen set, causes the scroll view to stop at multiples of the value ofsnapToInterval. This can be used for paginating through children that have lengths smaller than the scroll view. Used in combination withsnapToAlignmentanddecelerationRate="fast". Overrides less configurablepagingEnabledprop.snapToOffsetsWhen set, causes the scroll view to stop at the defined offsets. This can be used for paginating through variously sized children that have lengths smaller than the scroll view. Typically used in combination withdecelerationRate="fast". Overrides less configurablepagingEnabledandsnapToIntervalprops.snapToStartUse in conjuction withsnapToOffsets. By default, the beginning of the list counts as a snap offset. SetsnapToStartto false to disable this behavior and allow the list to scroll freely between its start and the firstsnapToOffsetsoffset. The default value is true.stickyHeaderIndicesAn array of child indices determining which children get docked to the top of the screen when scrolling. For example passingstickyHeaderIndices={[0]}will cause the first child to be fixed to the top of the scroll view. This property is not supported in conjunction withhorizontal={true}.styleStyletestIDUsed to locate this view in end-to-end tests.tvParallaxMagnification(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 1.0. platform iostvParallaxProperties(Apple TV only) Object with properties to control Apple TV parallax effects. platform iostvParallaxShiftDistanceX(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxShiftDistanceY(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxTiltAngle(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 0.05. platform iosupdateCellsBatchingPeriodAmount of time between low-pri item render batches, e.g. for rendering items quite a ways off screen. Similar fill rate/responsiveness tradeoff asmaxToRenderPerBatch.viewabilityConfigSeeViewabilityHelperfor flow type and further documentation.windowSizeDetermines the maximum number of items rendered outside of the visible area, in units of visible lengths. So if your list fills the screen, thenwindowSize={21}(the default) will render the visible screen area plus up to 10 screens above and 10 below the viewport. Reducing this number will reduce memory consumption and may improve performance, but will increase the chance that fast scrolling may reveal momentary blank areas of unrendered content.zoomScaleThe current scale of the scroll view content. The default value is 1.0.
#FlatListProps_optional Source
type FlatListProps_optional itemT = ("ItemSeparatorComponent" :: JSX, "ListEmptyComponent" :: JSX, "ListFooterComponent" :: JSX, "ListHeaderComponent" :: JSX, accessibilityActions :: Array String, accessibilityComponentType :: String, accessibilityElementsHidden :: Boolean, accessibilityHint :: String, accessibilityIgnoresInvertColors :: Boolean, accessibilityLabel :: String, accessibilityLiveRegion :: String, accessibilityRole :: String, accessibilityStates :: Array String, accessibilityTraits :: Array String, accessibilityViewIsModal :: Boolean, accessible :: Boolean, alwaysBounceHorizontal :: Boolean, alwaysBounceVertical :: Boolean, automaticallyAdjustContentInsets :: Boolean, bounces :: Boolean, bouncesZoom :: Boolean, canCancelContentTouches :: Boolean, centerContent :: Boolean, children :: Array JSX, collapsable :: Boolean, columnWrapperStyle :: CSS, contentContainerStyle :: CSS, contentInset :: Insets, contentInsetAdjustmentBehavior :: String, contentOffset :: PointPropType, debug :: Boolean, decelerationRate :: String, directionalLockEnabled :: Boolean, disableVirtualization :: Boolean, endFillColor :: String, extraData :: Foreign, getItem :: EffectFn2 Foreign Number itemT, getItemCount :: EffectFn1 Foreign Number, getItemLayout :: EffectFn2 (Array itemT) Number { index :: Number, length :: Number, offset :: Number }, hasTVPreferredFocus :: Boolean, hitSlop :: Insets, horizontal :: Boolean, importantForAccessibility :: String, indicatorStyle :: String, initialNumToRender :: Number, initialScrollIndex :: Number, invertStickyHeaders :: Boolean, inverted :: Boolean, isTVSelectable :: Boolean, key :: String, keyExtractor :: EffectFn2 itemT Number String, keyboardDismissMode :: String, keyboardShouldPersistTaps :: String, legacyImplementation :: Boolean, listKey :: String, maxToRenderPerBatch :: Number, maximumZoomScale :: Number, minimumZoomScale :: Number, nativeID :: String, needsOffscreenAlphaCompositing :: Boolean, nestedScrollEnabled :: Boolean, numColumns :: Number, onAccessibilityAction :: Effect Unit, onAccessibilityTap :: Effect Unit, onContentSizeChange :: EffectFn2 Number Number Unit, onEndReached :: EffectFn1 { distanceFromEnd :: Number } Unit, onEndReachedThreshold :: String, onLayout :: EffectFn1 LayoutChangeEvent Unit, onMagicTap :: Effect Unit, onMomentumScrollBegin :: EffectFn1 (NativeSyntheticEvent NativeScrollEvent) Unit, onMomentumScrollEnd :: EffectFn1 (NativeSyntheticEvent NativeScrollEvent) Unit, onMoveShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onMoveShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onRefresh :: Effect Unit, onResponderEnd :: EffectFn1 GestureResponderEvent Unit, onResponderGrant :: EffectFn1 GestureResponderEvent Unit, onResponderMove :: EffectFn1 GestureResponderEvent Unit, onResponderReject :: EffectFn1 GestureResponderEvent Unit, onResponderRelease :: EffectFn1 GestureResponderEvent Unit, onResponderStart :: EffectFn1 GestureResponderEvent Unit, onResponderTerminate :: EffectFn1 GestureResponderEvent Unit, onResponderTerminationRequest :: EffectFn1 GestureResponderEvent Boolean, onScroll :: EffectFn1 (NativeSyntheticEvent NativeScrollEvent) Unit, onScrollAnimationEnd :: Effect Unit, onScrollBeginDrag :: EffectFn1 (NativeSyntheticEvent NativeScrollEvent) Unit, onScrollEndDrag :: EffectFn1 (NativeSyntheticEvent NativeScrollEvent) Unit, onScrollToIndexFailed :: EffectFn1 { averageItemLength :: Number, highestMeasuredFrameIndex :: Number, index :: Number } Unit, onStartShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onTouchCancel :: EffectFn1 GestureResponderEvent Unit, onTouchEnd :: EffectFn1 GestureResponderEvent Unit, onTouchEndCapture :: EffectFn1 GestureResponderEvent Unit, onTouchMove :: EffectFn1 GestureResponderEvent Unit, onTouchStart :: EffectFn1 GestureResponderEvent Unit, onViewableItemsChanged :: EffectFn1 { changed :: Array ViewToken, viewableItems :: Array ViewToken } Unit, overScrollMode :: String, pagingEnabled :: Boolean, pinchGestureEnabled :: Boolean, pointerEvents :: String, progressViewOffset :: Number, refreshControl :: JSX, refreshing :: String, removeClippedSubviews :: Boolean, renderScrollComponent :: EffectFn1 (Record ScrollViewProps) JSX, renderToHardwareTextureAndroid :: Boolean, scrollEnabled :: Boolean, scrollEventThrottle :: Number, scrollIndicatorInsets :: Insets, scrollPerfTag :: String, scrollsToTop :: Boolean, shouldRasterizeIOS :: Boolean, showsHorizontalScrollIndicator :: Boolean, showsVerticalScrollIndicator :: Boolean, snapToAlignment :: String, snapToEnd :: Boolean, snapToInterval :: Number, snapToOffsets :: Array Number, snapToStart :: Boolean, stickyHeaderIndices :: Array Number, style :: CSS, testID :: String, tvParallaxMagnification :: Number, tvParallaxProperties :: { enabled :: Boolean, magnification :: Number, pressDelay :: Number, pressDuration :: Number, pressMagnification :: Number, shiftDistanceX :: Number, shiftDistanceY :: Number, tiltAngle :: Number }, tvParallaxShiftDistanceX :: Number, tvParallaxShiftDistanceY :: Number, tvParallaxTiltAngle :: Number, updateCellsBatchingPeriod :: Number, viewabilityConfig :: Foreign, viewabilityConfigCallbackPairs :: Array ViewabilityConfigCallbackPair, windowSize :: Number, zoomScale :: Number)ItemSeparatorComponentRendered in between each item, but not at the top or bottomListEmptyComponentRendered when the list is empty.ListFooterComponentRendered at the very end of the list.ListHeaderComponentRendered at the very beginning of the list.accessibilityActionsProvides an array of custom actions available for accessibility. platform iosaccessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibilityViewIsModalA Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.alwaysBounceHorizontalWhen true the scroll view bounces horizontally when it reaches the end even if the content is smaller than the scroll view itself. The default value is true whenhorizontal={true}and false otherwise.alwaysBounceVerticalWhen true the scroll view bounces vertically when it reaches the end even if the content is smaller than the scroll view itself. The default value is false whenhorizontal={true}and true otherwise.automaticallyAdjustContentInsetsControls whether iOS should automatically adjust the content inset for scroll views that are placed behind a navigation bar or tab bar/ toolbar. The default value is true.bouncesWhen true the scroll view bounces when it reaches the end of the content if the content is larger then the scroll view along the axis of the scroll direction. When false it disables all bouncing even if thealwaysBounce*props are true. The default value is true.bouncesZoomWhen true gestures can drive zoom past min/max and the zoom will animate to the min/max value at gesture end otherwise the zoom will not exceed the limits.canCancelContentTouchesWhen false once tracking starts won't try to drag if the touch moves. The default value is true.centerContentWhen true the scroll view automatically centers the content when the content is smaller than the scroll view bounds; when the content is larger than the scroll view this property has no effect. The default value is false.collapsableViews that are only used to layout their children or otherwise don't draw anything may be automatically removed from the native hierarchy as an optimization. Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.columnWrapperStyleOptional custom style for multi-item rows generated when numColumns > 1contentContainerStyleThese styles will be applied to the scroll view content container which wraps all of the child views. Example: return ( <ScrollView contentContainerStyle={styles.contentContainer}> </ScrollView> ); ... const styles = StyleSheet.create({ contentContainer: { paddingVertical: 20 } });contentInsetThe amount by which the scroll view content is inset from the edges of the scroll view. Defaults to {0, 0, 0, 0}.contentInsetAdjustmentBehaviorThis property specifies how the safe area insets are used to modify the content area of the scroll view. The default value of this property must be 'automatic'. But the default value is 'never' until RN@0.51.contentOffsetUsed to manually set the starting scroll offset. The default value is {x: 0, y: 0}dataFor simplicity, data is just a plain array. If you want to use something else, like an immutable list, use the underlying VirtualizedList directly.debugdebugwill turn on extra logging and visual overlays to aid with debugging both usage and implementation, but with a significant perf hit.decelerationRateA floating-point number that determines how quickly the scroll view decelerates after the user lifts their finger. Reasonable choices include - Normal: 0.998 (the default) - Fast: 0.9directionalLockEnabledWhen true the ScrollView will try to lock to only vertical or horizontal scrolling while dragging. The default value is false.disableVirtualizationDEPRECATED: Virtualization provides significant performance and memory optimizations, but fully unmounts react instances that are outside of the render window. You should only need to disable this for debugging purposes.endFillColorSometimes a scrollview takes up more space than its content fills. When this is the case, this prop will fill the rest of the scrollview with a color to avoid setting a background and creating unnecessary overdraw. This is an advanced optimization that is not needed in the general case.extraDataA marker property for telling the list to re-render (since it implements PureComponent). If any of yourrenderItem, Header, Footer, etc. functions depend on anything outside of thedataprop, stick it here and treat it immutably.getItemA generic accessor for extracting an item from any sort of data blob.getItemCountDetermines how many items are in the data blob.getItemLayoutgetItemLayoutis an optional optimization that lets us skip measurement of dynamic content if you know the height of items a priori. getItemLayout is the most efficient, and is easy to use if you have fixed height items, for example:* getItemLayout={(data, index) => ( * {length: ITEM_HEIGHT, offset: ITEM_HEIGHT * index, index} * )} *Remember to include separator length (height or width) in your offset calculation if you specifyItemSeparatorComponent.hasTVPreferredFocus(Apple TV only) May be set to true to force the Apple TV focus engine to move focus to this view. platform ioshitSlopThis defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets that are at least 30 - 40 points/density-independent pixels. If a Touchable view has a height of 20 the touchable height can be extended to 40 with hitSlop={{top: 10, bottom: 10, left: 0, right: 0}} NOTE The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.horizontalIf true, renders items next to each other horizontally instead of stacked vertically.importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.indicatorStyleThe style of the scroll indicators. - default (the default), same as black. - black, scroll indicator is black. This style is good against a white content background. - white, scroll indicator is white. This style is good against a black content background.initialNumToRenderHow many items to render in the initial batchinitialScrollIndexInstead of starting at the top with the first item, start at initialScrollIndexinvertStickyHeadersIf sticky headers should stick at the bottom instead of the top of the ScrollView. This is usually used with inverted ScrollViews.invertedReverses the direction of scroll. Uses scale transforms of -1.isTVSelectable(Apple TV only) When set to true, this view will be focusable and navigable using the Apple TV remote. platform ioskeyExtractorUsed to extract a unique key for a given item at the specified index. Key is used for caching and as the react key to track item re-ordering. The default extractor checksitem.key, then falls back to using the index, like React does.keyboardDismissModeDetermines whether the keyboard gets dismissed in response to a drag. - 'none' (the default) drags do not dismiss the keyboard. - 'onDrag' the keyboard is dismissed when a drag begins. - 'interactive' the keyboard is dismissed interactively with the drag and moves in synchrony with the touch; dragging upwards cancels the dismissal.keyboardShouldPersistTapsDetermines when the keyboard should stay visible after a tap. - 'never' (the default), tapping outside of the focused text input when the keyboard is up dismisses the keyboard. When this happens, children won't receive the tap. - 'always', the keyboard will not dismiss automatically, and the scroll view will not catch taps, but children of the scroll view can catch taps. - 'handled', the keyboard will not dismiss automatically when the tap was handled by a children, (or captured by an ancestor). - false, deprecated, use 'never' instead - true, deprecated, use 'always' insteadlegacyImplementationUses legacy MetroListView instead of default VirtualizedSectionListmaxToRenderPerBatchThe maximum number of items to render in each incremental render batch. The more rendered at once, the better the fill rate, but responsiveness my suffer because rendering content may interfere with responding to button taps or other interactions.maximumZoomScaleThe maximum allowed zoom scale. The default value is 1.0.minimumZoomScaleThe minimum allowed zoom scale. The default value is 1.0.nativeIDUsed to reference react managed views from native code.needsOffscreenAlphaCompositingWhether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. The default (false) falls back to drawing the component and its children with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. This default may be noticeable and undesired in the case where the View you are setting an opacity on has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background). Rendering offscreen to preserve correct alpha behavior is extremely expensive and hard to debug for non-native developers, which is why it is not turned on by default. If you do need to enable this property for an animation, consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). If that property is enabled, this View will be rendered off-screen once, saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU.nestedScrollEnabledEnables nested scrolling for Android API level 21+. Nested scrolling is supported by default on iOS.numColumnsMultiple columns can only be rendered withhorizontal={false}and will zig-zag like aflexWraplayout. Items should all be the same height - masonry layouts are not supported.onAccessibilityActionWhenaccessibleis true, the system will try to invoke this function when the user performs an accessibility custom action. platform iosonAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonContentSizeChangeCalled when scrollable content view of the ScrollView changes. Handler function is passed the content width and content height as parameters: (contentWidth, contentHeight) It's implemented using onLayout handler attached to the content container which this ScrollView renders.onEndReachedCalled once when the scroll position gets within onEndReachedThreshold of the rendered content.onEndReachedThresholdHow far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger theonEndReachedcallback. Thus a value of 0.5 will triggeronEndReachedwhen the end of the content is within half the visible length of the list.onMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonMomentumScrollBeginFires when scroll view has begun movingonMomentumScrollEndFires when scroll view has finished movingonMoveShouldSetResponderCalled for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?onMoveShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onRefreshIf provided, a standard RefreshControl will be added for "Pull to Refresh" functionality. Make sure to also set the refreshing prop correctly.onResponderEndIf the View returns true and attempts to become the responder, one of the following will happen:onResponderGrantThe View is now responding for touch events. This is the time to highlight and show the user what is happeningonResponderMoveIf the view is responding, the following handlers can be called: The user is moving their fingeronResponderRejectSomething else is the responder right now and will not release itonResponderReleaseFired at the end of the touch, ie "touchUp"onResponderTerminateThe responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationRequest, or might be taken by the OS without asking (happens with control center/ notification center on iOS)onResponderTerminationRequestSomething else wants to become responder. Should this view release the responder? Returning true allows releaseonScrollFires at most once per frame during scrolling. The frequency of the events can be contolled using the scrollEventThrottle prop.onScrollAnimationEndCalled when a scrolling animation ends.onScrollBeginDragFires if a user initiates a scroll gesture.onScrollEndDragFires when a user has finished scrolling.onScrollToIndexFailedUsed to handle failures when scrolling to an index that has not been measured yet. Recommended action is to either compute your own offset andscrollToit, or scroll as far as possible and then try again after more items have been rendered.onStartShouldSetResponderA view can become the touch responder by implementing the correct negotiation methods. There are two methods to ask the view if it wants to become responder: Does this view want to become responder on the start of a touch?onStartShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onViewableItemsChangedCalled when the viewability of rows changes, as defined by theviewablePercentThresholdprop.overScrollModeUsed to override default value of overScroll mode. Possible values: - 'auto' - Default value, allow a user to over-scroll this view only if the content is large enough to meaningfully scroll. - 'always' - Always allow a user to over-scroll this view. - 'never' - Never allow a user to over-scroll this view.pagingEnabledWhen true the scroll view stops on multiples of the scroll view's size when scrolling. This can be used for horizontal pagination. The default value is false.pinchGestureEnabledWhen true, ScrollView allows use of pinch gestures to zoom in and out. The default value is true.pointerEventsIn the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class: .box-none { pointer-events: none; } .box-none * { pointer-events: all; } box-only is the equivalent of .box-only { pointer-events: all; } .box-only * { pointer-events: none; } But since pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform.progressViewOffsetSet this when offset is needed for the loading indicator to show correctly. platform androidrefreshControlA RefreshControl component, used to provide pull-to-refresh functionality for the ScrollView.refreshingSet this true while waiting for new data from a refresh.removeClippedSubviewsNote: may have bugs (missing content) in some circumstances - use at your own risk. This may improve scroll performance for large lists.renderItemTakes an item from data and renders it into the list. Typical usage:* _renderItem = ({item}) => ( * <TouchableOpacity onPress={() => this._onPress(item)}> * <Text>{item.title}</Text> * <TouchableOpacity/> * ); * ... * <FlatList data={[{title: 'Title Text', key: 'item1'}]} renderItem={this._renderItem} /> *Provides additional metadata likeindexif you need it.renderScrollComponentRender a custom scroll component, e.g. with a differently styledRefreshControl.renderToHardwareTextureAndroidWhether this view should render itself (and all of its children) into a single hardware texture on the GPU. On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation.scrollEnabledWhen false, the content does not scroll. The default value is truescrollEventThrottleThis controls how often the scroll event will be fired while scrolling (in events per seconds). A higher number yields better accuracy for code that is tracking the scroll position, but can lead to scroll performance problems due to the volume of information being send over the bridge. The default value is zero, which means the scroll event will be sent only once each time the view is scrolled.scrollIndicatorInsetsThe amount by which the scroll view indicators are inset from the edges of the scroll view. This should normally be set to the same value as the contentInset. Defaults to {0, 0, 0, 0}.scrollPerfTagTag used to log scroll performance on this scroll view. Will force momentum events to be turned on (see sendMomentumEvents). This doesn't do anything out of the box and you need to implement a custom native FpsListener for it to be useful. platform androidscrollsToTopWhen true the scroll view scrolls to top when the status bar is tapped. The default value is true.shouldRasterizeIOSWhether this view should be rendered as a bitmap before compositing. On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view and quickly composite it during each frame. Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. Test and measure when using this property.showsHorizontalScrollIndicatorWhen true, shows a horizontal scroll indicator.showsVerticalScrollIndicatorWhen true, shows a vertical scroll indicator.snapToAlignmentWhensnapToIntervalis set,snapToAlignmentwill define the relationship of the the snapping to the scroll view. -start(the default) will align the snap at the left (horizontal) or top (vertical) -centerwill align the snap in the center -endwill align the snap at the right (horizontal) or bottom (vertical)snapToEndUse in conjuction withsnapToOffsets. By default, the end of the list counts as a snap offset. SetsnapToEndto false to disable this behavior and allow the list to scroll freely between its end and the lastsnapToOffsetsoffset. The default value is true.snapToIntervalWhen set, causes the scroll view to stop at multiples of the value ofsnapToInterval. This can be used for paginating through children that have lengths smaller than the scroll view. Used in combination withsnapToAlignmentanddecelerationRate="fast". Overrides less configurablepagingEnabledprop.snapToOffsetsWhen set, causes the scroll view to stop at the defined offsets. This can be used for paginating through variously sized children that have lengths smaller than the scroll view. Typically used in combination withdecelerationRate="fast". Overrides less configurablepagingEnabledandsnapToIntervalprops.snapToStartUse in conjuction withsnapToOffsets. By default, the beginning of the list counts as a snap offset. SetsnapToStartto false to disable this behavior and allow the list to scroll freely between its start and the firstsnapToOffsetsoffset. The default value is true.stickyHeaderIndicesAn array of child indices determining which children get docked to the top of the screen when scrolling. For example passingstickyHeaderIndices={[0]}will cause the first child to be fixed to the top of the scroll view. This property is not supported in conjunction withhorizontal={true}.styleStyletestIDUsed to locate this view in end-to-end tests.tvParallaxMagnification(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 1.0. platform iostvParallaxProperties(Apple TV only) Object with properties to control Apple TV parallax effects. platform iostvParallaxShiftDistanceX(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxShiftDistanceY(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxTiltAngle(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 0.05. platform iosupdateCellsBatchingPeriodAmount of time between low-pri item render batches, e.g. for rendering items quite a ways off screen. Similar fill rate/responsiveness tradeoff asmaxToRenderPerBatch.viewabilityConfigSeeViewabilityHelperfor flow type and further documentation.windowSizeDetermines the maximum number of items rendered outside of the visible area, in units of visible lengths. So if your list fills the screen, thenwindowSize={21}(the default) will render the visible screen area plus up to 10 screens above and 10 below the viewport. Reducing this number will reduce memory consumption and may improve performance, but will increase the chance that fast scrolling may reveal momentary blank areas of unrendered content.zoomScaleThe current scale of the scroll view content. The default value is 1.0.
#DrawerLayoutAndroidProps_required Source
type DrawerLayoutAndroidProps_required optional = (renderNavigationView :: Effect JSX | optional)see DrawerLayoutAndroid.android.js
accessibilityActionsProvides an array of custom actions available for accessibility. platform iosaccessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibilityViewIsModalA Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.collapsableViews that are only used to layout their children or otherwise don't draw anything may be automatically removed from the native hierarchy as an optimization. Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.drawerBackgroundColorSpecifies the background color of the drawer. The default value is white. If you want to set the opacity of the drawer, use rgba. Example: return ( <DrawerLayoutAndroid drawerBackgroundColor="rgba(0,0,0,0.5)"> </DrawerLayoutAndroid> );drawerLockModeSpecifies the lock mode of the drawer. The drawer can be locked in 3 states: - unlocked (default), meaning that the drawer will respond (open/close) to touch gestures. - locked-closed, meaning that the drawer will stay closed and not respond to gestures. - locked-open, meaning that the drawer will stay opened and not respond to gestures. The drawer may still be opened and closed programmatically (openDrawer/closeDrawer).drawerPositionSpecifies the side of the screen from which the drawer will slide in. enum(DrawerLayoutAndroid.positions.Left, DrawerLayoutAndroid.positions.Right)drawerWidthSpecifies the width of the drawer, more precisely the width of the view that be pulled in from the edge of the window.hasTVPreferredFocus(Apple TV only) May be set to true to force the Apple TV focus engine to move focus to this view. platform ioshitSlopThis defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets that are at least 30 - 40 points/density-independent pixels. If a Touchable view has a height of 20 the touchable height can be extended to 40 with hitSlop={{top: 10, bottom: 10, left: 0, right: 0}} NOTE The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.isTVSelectable(Apple TV only) When set to true, this view will be focusable and navigable using the Apple TV remote. platform ioskeyboardDismissModeDetermines whether the keyboard gets dismissed in response to a drag. - 'none' (the default), drags do not dismiss the keyboard. - 'on-drag', the keyboard is dismissed when a drag begins.nativeIDUsed to reference react managed views from native code.needsOffscreenAlphaCompositingWhether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. The default (false) falls back to drawing the component and its children with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. This default may be noticeable and undesired in the case where the View you are setting an opacity on has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background). Rendering offscreen to preserve correct alpha behavior is extremely expensive and hard to debug for non-native developers, which is why it is not turned on by default. If you do need to enable this property for an animation, consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). If that property is enabled, this View will be rendered off-screen once, saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU.onAccessibilityActionWhenaccessibleis true, the system will try to invoke this function when the user performs an accessibility custom action. platform iosonAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonDrawerCloseFunction called whenever the navigation view has been closed.onDrawerOpenFunction called whenever the navigation view has been opened.onDrawerSlideFunction called whenever there is an interaction with the navigation view.onDrawerStateChangedFunction called when the drawer state has changed. The drawer can be in 3 states: - idle, meaning there is no interaction with the navigation view happening at the time - dragging, meaning there is currently an interaction with the navigation view - settling, meaning that there was an interaction with the navigation view, and the navigation view is now finishing it's closing or opening animationonLayoutInvoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height}}}.onMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonMoveShouldSetResponderCalled for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?onMoveShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onResponderEndIf the View returns true and attempts to become the responder, one of the following will happen:onResponderGrantThe View is now responding for touch events. This is the time to highlight and show the user what is happeningonResponderMoveIf the view is responding, the following handlers can be called: The user is moving their fingeronResponderRejectSomething else is the responder right now and will not release itonResponderReleaseFired at the end of the touch, ie "touchUp"onResponderTerminateThe responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationRequest, or might be taken by the OS without asking (happens with control center/ notification center on iOS)onResponderTerminationRequestSomething else wants to become responder. Should this view release the responder? Returning true allows releaseonStartShouldSetResponderA view can become the touch responder by implementing the correct negotiation methods. There are two methods to ask the view if it wants to become responder: Does this view want to become responder on the start of a touch?onStartShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.pointerEventsIn the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class: .box-none { pointer-events: none; } .box-none * { pointer-events: all; } box-only is the equivalent of .box-only { pointer-events: all; } .box-only * { pointer-events: none; } But since pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform.removeClippedSubviewsThis is a special performance property exposed by RCTView and is useful for scrolling content when there are many subviews, most of which are offscreen. For this property to be effective, it must be applied to a view that contains many subviews that extend outside its bound. The subviews must also have overflow: hidden, as should the containing view (or one of its superviews).renderNavigationViewThe navigation view that will be rendered to the side of the screen and can be pulled in.renderToHardwareTextureAndroidWhether this view should render itself (and all of its children) into a single hardware texture on the GPU. On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation.shouldRasterizeIOSWhether this view should be rendered as a bitmap before compositing. On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view and quickly composite it during each frame. Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. Test and measure when using this property.statusBarBackgroundColorMake the drawer take the entire screen and draw the background of the status bar to allow it to open over the status bar. It will only have an effect on API 21+.testIDUsed to locate this view in end-to-end tests.tvParallaxMagnification(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 1.0. platform iostvParallaxProperties(Apple TV only) Object with properties to control Apple TV parallax effects. platform iostvParallaxShiftDistanceX(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxShiftDistanceY(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxTiltAngle(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 0.05. platform ios
#DrawerLayoutAndroidProps_optional Source
type DrawerLayoutAndroidProps_optional = (accessibilityActions :: Array String, accessibilityComponentType :: String, accessibilityElementsHidden :: Boolean, accessibilityHint :: String, accessibilityIgnoresInvertColors :: Boolean, accessibilityLabel :: String, accessibilityLiveRegion :: String, accessibilityRole :: String, accessibilityStates :: Array String, accessibilityTraits :: Array String, accessibilityViewIsModal :: Boolean, accessible :: Boolean, children :: Array JSX, collapsable :: Boolean, drawerBackgroundColor :: String, drawerLockMode :: String, drawerPosition :: Number, drawerWidth :: Number, hasTVPreferredFocus :: Boolean, hitSlop :: Insets, importantForAccessibility :: String, isTVSelectable :: Boolean, key :: String, keyboardDismissMode :: String, nativeID :: String, needsOffscreenAlphaCompositing :: Boolean, onAccessibilityAction :: Effect Unit, onAccessibilityTap :: Effect Unit, onDrawerClose :: Effect Unit, onDrawerOpen :: Effect Unit, onDrawerSlide :: EffectFn1 DrawerSlideEvent Unit, onDrawerStateChanged :: EffectFn1 String Unit, onLayout :: EffectFn1 LayoutChangeEvent Unit, onMagicTap :: Effect Unit, onMoveShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onMoveShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onResponderEnd :: EffectFn1 GestureResponderEvent Unit, onResponderGrant :: EffectFn1 GestureResponderEvent Unit, onResponderMove :: EffectFn1 GestureResponderEvent Unit, onResponderReject :: EffectFn1 GestureResponderEvent Unit, onResponderRelease :: EffectFn1 GestureResponderEvent Unit, onResponderStart :: EffectFn1 GestureResponderEvent Unit, onResponderTerminate :: EffectFn1 GestureResponderEvent Unit, onResponderTerminationRequest :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onTouchCancel :: EffectFn1 GestureResponderEvent Unit, onTouchEnd :: EffectFn1 GestureResponderEvent Unit, onTouchEndCapture :: EffectFn1 GestureResponderEvent Unit, onTouchMove :: EffectFn1 GestureResponderEvent Unit, onTouchStart :: EffectFn1 GestureResponderEvent Unit, pointerEvents :: String, removeClippedSubviews :: Boolean, renderToHardwareTextureAndroid :: Boolean, shouldRasterizeIOS :: Boolean, statusBarBackgroundColor :: String, style :: CSS, testID :: String, tvParallaxMagnification :: Number, tvParallaxProperties :: { enabled :: Boolean, magnification :: Number, pressDelay :: Number, pressDuration :: Number, pressMagnification :: Number, shiftDistanceX :: Number, shiftDistanceY :: Number, tiltAngle :: Number }, tvParallaxShiftDistanceX :: Number, tvParallaxShiftDistanceY :: Number, tvParallaxTiltAngle :: Number)see DrawerLayoutAndroid.android.js
accessibilityActionsProvides an array of custom actions available for accessibility. platform iosaccessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibilityViewIsModalA Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.collapsableViews that are only used to layout their children or otherwise don't draw anything may be automatically removed from the native hierarchy as an optimization. Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.drawerBackgroundColorSpecifies the background color of the drawer. The default value is white. If you want to set the opacity of the drawer, use rgba. Example: return ( <DrawerLayoutAndroid drawerBackgroundColor="rgba(0,0,0,0.5)"> </DrawerLayoutAndroid> );drawerLockModeSpecifies the lock mode of the drawer. The drawer can be locked in 3 states: - unlocked (default), meaning that the drawer will respond (open/close) to touch gestures. - locked-closed, meaning that the drawer will stay closed and not respond to gestures. - locked-open, meaning that the drawer will stay opened and not respond to gestures. The drawer may still be opened and closed programmatically (openDrawer/closeDrawer).drawerPositionSpecifies the side of the screen from which the drawer will slide in. enum(DrawerLayoutAndroid.positions.Left, DrawerLayoutAndroid.positions.Right)drawerWidthSpecifies the width of the drawer, more precisely the width of the view that be pulled in from the edge of the window.hasTVPreferredFocus(Apple TV only) May be set to true to force the Apple TV focus engine to move focus to this view. platform ioshitSlopThis defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets that are at least 30 - 40 points/density-independent pixels. If a Touchable view has a height of 20 the touchable height can be extended to 40 with hitSlop={{top: 10, bottom: 10, left: 0, right: 0}} NOTE The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.isTVSelectable(Apple TV only) When set to true, this view will be focusable and navigable using the Apple TV remote. platform ioskeyboardDismissModeDetermines whether the keyboard gets dismissed in response to a drag. - 'none' (the default), drags do not dismiss the keyboard. - 'on-drag', the keyboard is dismissed when a drag begins.nativeIDUsed to reference react managed views from native code.needsOffscreenAlphaCompositingWhether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. The default (false) falls back to drawing the component and its children with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. This default may be noticeable and undesired in the case where the View you are setting an opacity on has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background). Rendering offscreen to preserve correct alpha behavior is extremely expensive and hard to debug for non-native developers, which is why it is not turned on by default. If you do need to enable this property for an animation, consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). If that property is enabled, this View will be rendered off-screen once, saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU.onAccessibilityActionWhenaccessibleis true, the system will try to invoke this function when the user performs an accessibility custom action. platform iosonAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonDrawerCloseFunction called whenever the navigation view has been closed.onDrawerOpenFunction called whenever the navigation view has been opened.onDrawerSlideFunction called whenever there is an interaction with the navigation view.onDrawerStateChangedFunction called when the drawer state has changed. The drawer can be in 3 states: - idle, meaning there is no interaction with the navigation view happening at the time - dragging, meaning there is currently an interaction with the navigation view - settling, meaning that there was an interaction with the navigation view, and the navigation view is now finishing it's closing or opening animationonLayoutInvoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height}}}.onMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonMoveShouldSetResponderCalled for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?onMoveShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onResponderEndIf the View returns true and attempts to become the responder, one of the following will happen:onResponderGrantThe View is now responding for touch events. This is the time to highlight and show the user what is happeningonResponderMoveIf the view is responding, the following handlers can be called: The user is moving their fingeronResponderRejectSomething else is the responder right now and will not release itonResponderReleaseFired at the end of the touch, ie "touchUp"onResponderTerminateThe responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationRequest, or might be taken by the OS without asking (happens with control center/ notification center on iOS)onResponderTerminationRequestSomething else wants to become responder. Should this view release the responder? Returning true allows releaseonStartShouldSetResponderA view can become the touch responder by implementing the correct negotiation methods. There are two methods to ask the view if it wants to become responder: Does this view want to become responder on the start of a touch?onStartShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.pointerEventsIn the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class: .box-none { pointer-events: none; } .box-none * { pointer-events: all; } box-only is the equivalent of .box-only { pointer-events: all; } .box-only * { pointer-events: none; } But since pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform.removeClippedSubviewsThis is a special performance property exposed by RCTView and is useful for scrolling content when there are many subviews, most of which are offscreen. For this property to be effective, it must be applied to a view that contains many subviews that extend outside its bound. The subviews must also have overflow: hidden, as should the containing view (or one of its superviews).renderNavigationViewThe navigation view that will be rendered to the side of the screen and can be pulled in.renderToHardwareTextureAndroidWhether this view should render itself (and all of its children) into a single hardware texture on the GPU. On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation.shouldRasterizeIOSWhether this view should be rendered as a bitmap before compositing. On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view and quickly composite it during each frame. Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. Test and measure when using this property.statusBarBackgroundColorMake the drawer take the entire screen and draw the background of the status bar to allow it to open over the status bar. It will only have an effect on API 21+.testIDUsed to locate this view in end-to-end tests.tvParallaxMagnification(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 1.0. platform iostvParallaxProperties(Apple TV only) Object with properties to control Apple TV parallax effects. platform iostvParallaxShiftDistanceX(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxShiftDistanceY(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxTiltAngle(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 0.05. platform ios
#DocumentSelectionState Source
data DocumentSelectionState :: Type#DatePickerIOSProps_required Source
type DatePickerIOSProps_required optional = (date :: JSDate, onDateChange :: EffectFn1 JSDate Unit | optional)accessibilityActionsProvides an array of custom actions available for accessibility. platform iosaccessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibilityViewIsModalA Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.collapsableViews that are only used to layout their children or otherwise don't draw anything may be automatically removed from the native hierarchy as an optimization. Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.dateThe currently selected date.hasTVPreferredFocus(Apple TV only) May be set to true to force the Apple TV focus engine to move focus to this view. platform ioshitSlopThis defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets that are at least 30 - 40 points/density-independent pixels. If a Touchable view has a height of 20 the touchable height can be extended to 40 with hitSlop={{top: 10, bottom: 10, left: 0, right: 0}} NOTE The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.isTVSelectable(Apple TV only) When set to true, this view will be focusable and navigable using the Apple TV remote. platform ioslocaleThe date picker locale.maximumDateMaximum date. Restricts the range of possible date/time values.minimumDateMaximum date. Restricts the range of possible date/time values.minuteIntervalenum(1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30) The interval at which minutes can be selected.modeenum('date', 'time', 'datetime') The date picker mode.nativeIDUsed to reference react managed views from native code.needsOffscreenAlphaCompositingWhether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. The default (false) falls back to drawing the component and its children with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. This default may be noticeable and undesired in the case where the View you are setting an opacity on has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background). Rendering offscreen to preserve correct alpha behavior is extremely expensive and hard to debug for non-native developers, which is why it is not turned on by default. If you do need to enable this property for an animation, consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). If that property is enabled, this View will be rendered off-screen once, saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU.onAccessibilityActionWhenaccessibleis true, the system will try to invoke this function when the user performs an accessibility custom action. platform iosonAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonDateChangeDate change handler. This is called when the user changes the date or time in the UI. The first and only argument is a Date object representing the new date and time.onLayoutInvoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height}}}.onMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonMoveShouldSetResponderCalled for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?onMoveShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onResponderEndIf the View returns true and attempts to become the responder, one of the following will happen:onResponderGrantThe View is now responding for touch events. This is the time to highlight and show the user what is happeningonResponderMoveIf the view is responding, the following handlers can be called: The user is moving their fingeronResponderRejectSomething else is the responder right now and will not release itonResponderReleaseFired at the end of the touch, ie "touchUp"onResponderTerminateThe responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationRequest, or might be taken by the OS without asking (happens with control center/ notification center on iOS)onResponderTerminationRequestSomething else wants to become responder. Should this view release the responder? Returning true allows releaseonStartShouldSetResponderA view can become the touch responder by implementing the correct negotiation methods. There are two methods to ask the view if it wants to become responder: Does this view want to become responder on the start of a touch?onStartShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.pointerEventsIn the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class: .box-none { pointer-events: none; } .box-none * { pointer-events: all; } box-only is the equivalent of .box-only { pointer-events: all; } .box-only * { pointer-events: none; } But since pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform.removeClippedSubviewsThis is a special performance property exposed by RCTView and is useful for scrolling content when there are many subviews, most of which are offscreen. For this property to be effective, it must be applied to a view that contains many subviews that extend outside its bound. The subviews must also have overflow: hidden, as should the containing view (or one of its superviews).renderToHardwareTextureAndroidWhether this view should render itself (and all of its children) into a single hardware texture on the GPU. On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation.shouldRasterizeIOSWhether this view should be rendered as a bitmap before compositing. On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view and quickly composite it during each frame. Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. Test and measure when using this property.testIDUsed to locate this view in end-to-end tests.timeZoneOffsetInMinutesTimezone offset in minutes. By default, the date picker will use the device's timezone. With this parameter, it is possible to force a certain timezone offset. For instance, to show times in Pacific Standard Time, pass -7 * 60.tvParallaxMagnification(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 1.0. platform iostvParallaxProperties(Apple TV only) Object with properties to control Apple TV parallax effects. platform iostvParallaxShiftDistanceX(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxShiftDistanceY(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxTiltAngle(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 0.05. platform ios
#DatePickerIOSProps_optional Source
type DatePickerIOSProps_optional = (accessibilityActions :: Array String, accessibilityComponentType :: String, accessibilityElementsHidden :: Boolean, accessibilityHint :: String, accessibilityIgnoresInvertColors :: Boolean, accessibilityLabel :: String, accessibilityLiveRegion :: String, accessibilityRole :: String, accessibilityStates :: Array String, accessibilityTraits :: Array String, accessibilityViewIsModal :: Boolean, accessible :: Boolean, children :: Array JSX, collapsable :: Boolean, hasTVPreferredFocus :: Boolean, hitSlop :: Insets, importantForAccessibility :: String, isTVSelectable :: Boolean, key :: String, locale :: String, maximumDate :: JSDate, minimumDate :: JSDate, minuteInterval :: Number, mode :: String, nativeID :: String, needsOffscreenAlphaCompositing :: Boolean, onAccessibilityAction :: Effect Unit, onAccessibilityTap :: Effect Unit, onLayout :: EffectFn1 LayoutChangeEvent Unit, onMagicTap :: Effect Unit, onMoveShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onMoveShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onResponderEnd :: EffectFn1 GestureResponderEvent Unit, onResponderGrant :: EffectFn1 GestureResponderEvent Unit, onResponderMove :: EffectFn1 GestureResponderEvent Unit, onResponderReject :: EffectFn1 GestureResponderEvent Unit, onResponderRelease :: EffectFn1 GestureResponderEvent Unit, onResponderStart :: EffectFn1 GestureResponderEvent Unit, onResponderTerminate :: EffectFn1 GestureResponderEvent Unit, onResponderTerminationRequest :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onTouchCancel :: EffectFn1 GestureResponderEvent Unit, onTouchEnd :: EffectFn1 GestureResponderEvent Unit, onTouchEndCapture :: EffectFn1 GestureResponderEvent Unit, onTouchMove :: EffectFn1 GestureResponderEvent Unit, onTouchStart :: EffectFn1 GestureResponderEvent Unit, pointerEvents :: String, removeClippedSubviews :: Boolean, renderToHardwareTextureAndroid :: Boolean, shouldRasterizeIOS :: Boolean, style :: CSS, testID :: String, timeZoneOffsetInMinutes :: Number, tvParallaxMagnification :: Number, tvParallaxProperties :: { enabled :: Boolean, magnification :: Number, pressDelay :: Number, pressDuration :: Number, pressMagnification :: Number, shiftDistanceX :: Number, shiftDistanceY :: Number, tiltAngle :: Number }, tvParallaxShiftDistanceX :: Number, tvParallaxShiftDistanceY :: Number, tvParallaxTiltAngle :: Number)accessibilityActionsProvides an array of custom actions available for accessibility. platform iosaccessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibilityViewIsModalA Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.collapsableViews that are only used to layout their children or otherwise don't draw anything may be automatically removed from the native hierarchy as an optimization. Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.dateThe currently selected date.hasTVPreferredFocus(Apple TV only) May be set to true to force the Apple TV focus engine to move focus to this view. platform ioshitSlopThis defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets that are at least 30 - 40 points/density-independent pixels. If a Touchable view has a height of 20 the touchable height can be extended to 40 with hitSlop={{top: 10, bottom: 10, left: 0, right: 0}} NOTE The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.isTVSelectable(Apple TV only) When set to true, this view will be focusable and navigable using the Apple TV remote. platform ioslocaleThe date picker locale.maximumDateMaximum date. Restricts the range of possible date/time values.minimumDateMaximum date. Restricts the range of possible date/time values.minuteIntervalenum(1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30) The interval at which minutes can be selected.modeenum('date', 'time', 'datetime') The date picker mode.nativeIDUsed to reference react managed views from native code.needsOffscreenAlphaCompositingWhether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. The default (false) falls back to drawing the component and its children with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. This default may be noticeable and undesired in the case where the View you are setting an opacity on has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background). Rendering offscreen to preserve correct alpha behavior is extremely expensive and hard to debug for non-native developers, which is why it is not turned on by default. If you do need to enable this property for an animation, consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). If that property is enabled, this View will be rendered off-screen once, saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU.onAccessibilityActionWhenaccessibleis true, the system will try to invoke this function when the user performs an accessibility custom action. platform iosonAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonDateChangeDate change handler. This is called when the user changes the date or time in the UI. The first and only argument is a Date object representing the new date and time.onLayoutInvoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height}}}.onMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonMoveShouldSetResponderCalled for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?onMoveShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onResponderEndIf the View returns true and attempts to become the responder, one of the following will happen:onResponderGrantThe View is now responding for touch events. This is the time to highlight and show the user what is happeningonResponderMoveIf the view is responding, the following handlers can be called: The user is moving their fingeronResponderRejectSomething else is the responder right now and will not release itonResponderReleaseFired at the end of the touch, ie "touchUp"onResponderTerminateThe responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationRequest, or might be taken by the OS without asking (happens with control center/ notification center on iOS)onResponderTerminationRequestSomething else wants to become responder. Should this view release the responder? Returning true allows releaseonStartShouldSetResponderA view can become the touch responder by implementing the correct negotiation methods. There are two methods to ask the view if it wants to become responder: Does this view want to become responder on the start of a touch?onStartShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.pointerEventsIn the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class: .box-none { pointer-events: none; } .box-none * { pointer-events: all; } box-only is the equivalent of .box-only { pointer-events: all; } .box-only * { pointer-events: none; } But since pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform.removeClippedSubviewsThis is a special performance property exposed by RCTView and is useful for scrolling content when there are many subviews, most of which are offscreen. For this property to be effective, it must be applied to a view that contains many subviews that extend outside its bound. The subviews must also have overflow: hidden, as should the containing view (or one of its superviews).renderToHardwareTextureAndroidWhether this view should render itself (and all of its children) into a single hardware texture on the GPU. On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation.shouldRasterizeIOSWhether this view should be rendered as a bitmap before compositing. On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view and quickly composite it during each frame. Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. Test and measure when using this property.testIDUsed to locate this view in end-to-end tests.timeZoneOffsetInMinutesTimezone offset in minutes. By default, the date picker will use the device's timezone. With this parameter, it is possible to force a certain timezone offset. For instance, to show times in Pacific Standard Time, pass -7 * 60.tvParallaxMagnification(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 1.0. platform iostvParallaxProperties(Apple TV only) Object with properties to control Apple TV parallax effects. platform iostvParallaxShiftDistanceX(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxShiftDistanceY(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxTiltAngle(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 0.05. platform ios
#CheckBoxProps Source
type CheckBoxProps = (accessibilityActions :: Array String, accessibilityComponentType :: String, accessibilityElementsHidden :: Boolean, accessibilityHint :: String, accessibilityIgnoresInvertColors :: Boolean, accessibilityLabel :: String, accessibilityLiveRegion :: String, accessibilityRole :: String, accessibilityStates :: Array String, accessibilityTraits :: Array String, accessibilityViewIsModal :: Boolean, accessible :: Boolean, children :: Array JSX, collapsable :: Boolean, disabled :: Boolean, hasTVPreferredFocus :: Boolean, hitSlop :: Insets, importantForAccessibility :: String, isTVSelectable :: Boolean, key :: String, nativeID :: String, needsOffscreenAlphaCompositing :: Boolean, onAccessibilityAction :: Effect Unit, onAccessibilityTap :: Effect Unit, onChange :: EffectFn1 Boolean Unit, onLayout :: EffectFn1 LayoutChangeEvent Unit, onMagicTap :: Effect Unit, onMoveShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onMoveShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onResponderEnd :: EffectFn1 GestureResponderEvent Unit, onResponderGrant :: EffectFn1 GestureResponderEvent Unit, onResponderMove :: EffectFn1 GestureResponderEvent Unit, onResponderReject :: EffectFn1 GestureResponderEvent Unit, onResponderRelease :: EffectFn1 GestureResponderEvent Unit, onResponderStart :: EffectFn1 GestureResponderEvent Unit, onResponderTerminate :: EffectFn1 GestureResponderEvent Unit, onResponderTerminationRequest :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onTouchCancel :: EffectFn1 GestureResponderEvent Unit, onTouchEnd :: EffectFn1 GestureResponderEvent Unit, onTouchEndCapture :: EffectFn1 GestureResponderEvent Unit, onTouchMove :: EffectFn1 GestureResponderEvent Unit, onTouchStart :: EffectFn1 GestureResponderEvent Unit, onValueChange :: EffectFn1 Boolean Unit, pointerEvents :: String, removeClippedSubviews :: Boolean, renderToHardwareTextureAndroid :: Boolean, shouldRasterizeIOS :: Boolean, style :: CSS, testID :: String, tvParallaxMagnification :: Number, tvParallaxProperties :: { enabled :: Boolean, magnification :: Number, pressDelay :: Number, pressDuration :: Number, pressMagnification :: Number, shiftDistanceX :: Number, shiftDistanceY :: Number, tiltAngle :: Number }, tvParallaxShiftDistanceX :: Number, tvParallaxShiftDistanceY :: Number, tvParallaxTiltAngle :: Number, value :: Boolean)accessibilityActionsProvides an array of custom actions available for accessibility. platform iosaccessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibilityViewIsModalA Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.collapsableViews that are only used to layout their children or otherwise don't draw anything may be automatically removed from the native hierarchy as an optimization. Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.disabledIf true the user won't be able to toggle the checkbox. Default value is false.hasTVPreferredFocus(Apple TV only) May be set to true to force the Apple TV focus engine to move focus to this view. platform ioshitSlopThis defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets that are at least 30 - 40 points/density-independent pixels. If a Touchable view has a height of 20 the touchable height can be extended to 40 with hitSlop={{top: 10, bottom: 10, left: 0, right: 0}} NOTE The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.isTVSelectable(Apple TV only) When set to true, this view will be focusable and navigable using the Apple TV remote. platform iosnativeIDUsed to reference react managed views from native code.needsOffscreenAlphaCompositingWhether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. The default (false) falls back to drawing the component and its children with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. This default may be noticeable and undesired in the case where the View you are setting an opacity on has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background). Rendering offscreen to preserve correct alpha behavior is extremely expensive and hard to debug for non-native developers, which is why it is not turned on by default. If you do need to enable this property for an animation, consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). If that property is enabled, this View will be rendered off-screen once, saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU.onAccessibilityActionWhenaccessibleis true, the system will try to invoke this function when the user performs an accessibility custom action. platform iosonAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonChangeUsed in case the props change removes the component.onLayoutInvoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height}}}.onMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonMoveShouldSetResponderCalled for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?onMoveShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onResponderEndIf the View returns true and attempts to become the responder, one of the following will happen:onResponderGrantThe View is now responding for touch events. This is the time to highlight and show the user what is happeningonResponderMoveIf the view is responding, the following handlers can be called: The user is moving their fingeronResponderRejectSomething else is the responder right now and will not release itonResponderReleaseFired at the end of the touch, ie "touchUp"onResponderTerminateThe responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationRequest, or might be taken by the OS without asking (happens with control center/ notification center on iOS)onResponderTerminationRequestSomething else wants to become responder. Should this view release the responder? Returning true allows releaseonStartShouldSetResponderA view can become the touch responder by implementing the correct negotiation methods. There are two methods to ask the view if it wants to become responder: Does this view want to become responder on the start of a touch?onStartShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onValueChangeInvoked with the new value when the value changes.pointerEventsIn the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class: .box-none { pointer-events: none; } .box-none * { pointer-events: all; } box-only is the equivalent of .box-only { pointer-events: all; } .box-only * { pointer-events: none; } But since pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform.removeClippedSubviewsThis is a special performance property exposed by RCTView and is useful for scrolling content when there are many subviews, most of which are offscreen. For this property to be effective, it must be applied to a view that contains many subviews that extend outside its bound. The subviews must also have overflow: hidden, as should the containing view (or one of its superviews).renderToHardwareTextureAndroidWhether this view should render itself (and all of its children) into a single hardware texture on the GPU. On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation.shouldRasterizeIOSWhether this view should be rendered as a bitmap before compositing. On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view and quickly composite it during each frame. Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. Test and measure when using this property.testIDUsed to locate this view in end-to-end tests.tvParallaxMagnification(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 1.0. platform iostvParallaxProperties(Apple TV only) Object with properties to control Apple TV parallax effects. platform iostvParallaxShiftDistanceX(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxShiftDistanceY(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxTiltAngle(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 0.05. platform iosvalueThe value of the checkbox. If true the checkbox will be turned on. Default value is false.
#ButtonProps_required Source
type ButtonProps_required optional = (onPress :: EffectFn1 (NativeSyntheticEvent NativeTouchEvent) Unit, title :: String | optional)testIDUsed to locate this button in end-to-end tests.
#ActivityIndicatorProps Source
type ActivityIndicatorProps = (accessibilityActions :: Array String, accessibilityComponentType :: String, accessibilityElementsHidden :: Boolean, accessibilityHint :: String, accessibilityIgnoresInvertColors :: Boolean, accessibilityLabel :: String, accessibilityLiveRegion :: String, accessibilityRole :: String, accessibilityStates :: Array String, accessibilityTraits :: Array String, accessibilityViewIsModal :: Boolean, accessible :: Boolean, animating :: Boolean, children :: Array JSX, collapsable :: Boolean, color :: String, hasTVPreferredFocus :: Boolean, hidesWhenStopped :: Boolean, hitSlop :: Insets, importantForAccessibility :: String, isTVSelectable :: Boolean, key :: String, nativeID :: String, needsOffscreenAlphaCompositing :: Boolean, onAccessibilityAction :: Effect Unit, onAccessibilityTap :: Effect Unit, onLayout :: EffectFn1 LayoutChangeEvent Unit, onMagicTap :: Effect Unit, onMoveShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onMoveShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onResponderEnd :: EffectFn1 GestureResponderEvent Unit, onResponderGrant :: EffectFn1 GestureResponderEvent Unit, onResponderMove :: EffectFn1 GestureResponderEvent Unit, onResponderReject :: EffectFn1 GestureResponderEvent Unit, onResponderRelease :: EffectFn1 GestureResponderEvent Unit, onResponderStart :: EffectFn1 GestureResponderEvent Unit, onResponderTerminate :: EffectFn1 GestureResponderEvent Unit, onResponderTerminationRequest :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onTouchCancel :: EffectFn1 GestureResponderEvent Unit, onTouchEnd :: EffectFn1 GestureResponderEvent Unit, onTouchEndCapture :: EffectFn1 GestureResponderEvent Unit, onTouchMove :: EffectFn1 GestureResponderEvent Unit, onTouchStart :: EffectFn1 GestureResponderEvent Unit, pointerEvents :: String, removeClippedSubviews :: Boolean, renderToHardwareTextureAndroid :: Boolean, shouldRasterizeIOS :: Boolean, size :: String, style :: CSS, testID :: String, tvParallaxMagnification :: Number, tvParallaxProperties :: { enabled :: Boolean, magnification :: Number, pressDelay :: Number, pressDuration :: Number, pressMagnification :: Number, shiftDistanceX :: Number, shiftDistanceY :: Number, tiltAngle :: Number }, tvParallaxShiftDistanceX :: Number, tvParallaxShiftDistanceY :: Number, tvParallaxTiltAngle :: Number)see https://facebook.github.io/react-native/docs/activityindicator.html#props
accessibilityActionsProvides an array of custom actions available for accessibility. platform iosaccessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibilityViewIsModalA Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.animatingWhether to show the indicator (true, the default) or hide it (false).collapsableViews that are only used to layout their children or otherwise don't draw anything may be automatically removed from the native hierarchy as an optimization. Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.colorThe foreground color of the spinner (default is gray).hasTVPreferredFocus(Apple TV only) May be set to true to force the Apple TV focus engine to move focus to this view. platform ioshidesWhenStoppedWhether the indicator should hide when not animating (true by default).hitSlopThis defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets that are at least 30 - 40 points/density-independent pixels. If a Touchable view has a height of 20 the touchable height can be extended to 40 with hitSlop={{top: 10, bottom: 10, left: 0, right: 0}} NOTE The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.isTVSelectable(Apple TV only) When set to true, this view will be focusable and navigable using the Apple TV remote. platform iosnativeIDUsed to reference react managed views from native code.needsOffscreenAlphaCompositingWhether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. The default (false) falls back to drawing the component and its children with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. This default may be noticeable and undesired in the case where the View you are setting an opacity on has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background). Rendering offscreen to preserve correct alpha behavior is extremely expensive and hard to debug for non-native developers, which is why it is not turned on by default. If you do need to enable this property for an animation, consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). If that property is enabled, this View will be rendered off-screen once, saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU.onAccessibilityActionWhenaccessibleis true, the system will try to invoke this function when the user performs an accessibility custom action. platform iosonAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonLayoutInvoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height}}}.onMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonMoveShouldSetResponderCalled for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?onMoveShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onResponderEndIf the View returns true and attempts to become the responder, one of the following will happen:onResponderGrantThe View is now responding for touch events. This is the time to highlight and show the user what is happeningonResponderMoveIf the view is responding, the following handlers can be called: The user is moving their fingeronResponderRejectSomething else is the responder right now and will not release itonResponderReleaseFired at the end of the touch, ie "touchUp"onResponderTerminateThe responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationRequest, or might be taken by the OS without asking (happens with control center/ notification center on iOS)onResponderTerminationRequestSomething else wants to become responder. Should this view release the responder? Returning true allows releaseonStartShouldSetResponderA view can become the touch responder by implementing the correct negotiation methods. There are two methods to ask the view if it wants to become responder: Does this view want to become responder on the start of a touch?onStartShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.pointerEventsIn the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class: .box-none { pointer-events: none; } .box-none * { pointer-events: all; } box-only is the equivalent of .box-only { pointer-events: all; } .box-only * { pointer-events: none; } But since pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform.removeClippedSubviewsThis is a special performance property exposed by RCTView and is useful for scrolling content when there are many subviews, most of which are offscreen. For this property to be effective, it must be applied to a view that contains many subviews that extend outside its bound. The subviews must also have overflow: hidden, as should the containing view (or one of its superviews).renderToHardwareTextureAndroidWhether this view should render itself (and all of its children) into a single hardware texture on the GPU. On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation.shouldRasterizeIOSWhether this view should be rendered as a bitmap before compositing. On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view and quickly composite it during each frame. Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. Test and measure when using this property.sizeSize of the indicator. Small has a height of 20, large has a height of 36. enum('small', 'large')testIDUsed to locate this view in end-to-end tests.tvParallaxMagnification(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 1.0. platform iostvParallaxProperties(Apple TV only) Object with properties to control Apple TV parallax effects. platform iostvParallaxShiftDistanceX(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxShiftDistanceY(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxTiltAngle(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 0.05. platform ios
#ActivityIndicatorIOSProps Source
type ActivityIndicatorIOSProps = (accessibilityActions :: Array String, accessibilityComponentType :: String, accessibilityElementsHidden :: Boolean, accessibilityHint :: String, accessibilityIgnoresInvertColors :: Boolean, accessibilityLabel :: String, accessibilityLiveRegion :: String, accessibilityRole :: String, accessibilityStates :: Array String, accessibilityTraits :: Array String, accessibilityViewIsModal :: Boolean, accessible :: Boolean, animating :: Boolean, children :: Array JSX, collapsable :: Boolean, color :: String, hasTVPreferredFocus :: Boolean, hidesWhenStopped :: Boolean, hitSlop :: Insets, importantForAccessibility :: String, isTVSelectable :: Boolean, key :: String, nativeID :: String, needsOffscreenAlphaCompositing :: Boolean, onAccessibilityAction :: Effect Unit, onAccessibilityTap :: Effect Unit, onLayout :: EffectFn1 { nativeEvent :: { layout :: { height :: Number, width :: Number, x :: Number, y :: Number } } } Unit, onMagicTap :: Effect Unit, onMoveShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onMoveShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onResponderEnd :: EffectFn1 GestureResponderEvent Unit, onResponderGrant :: EffectFn1 GestureResponderEvent Unit, onResponderMove :: EffectFn1 GestureResponderEvent Unit, onResponderReject :: EffectFn1 GestureResponderEvent Unit, onResponderRelease :: EffectFn1 GestureResponderEvent Unit, onResponderStart :: EffectFn1 GestureResponderEvent Unit, onResponderTerminate :: EffectFn1 GestureResponderEvent Unit, onResponderTerminationRequest :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponder :: EffectFn1 GestureResponderEvent Boolean, onStartShouldSetResponderCapture :: EffectFn1 GestureResponderEvent Boolean, onTouchCancel :: EffectFn1 GestureResponderEvent Unit, onTouchEnd :: EffectFn1 GestureResponderEvent Unit, onTouchEndCapture :: EffectFn1 GestureResponderEvent Unit, onTouchMove :: EffectFn1 GestureResponderEvent Unit, onTouchStart :: EffectFn1 GestureResponderEvent Unit, pointerEvents :: String, removeClippedSubviews :: Boolean, renderToHardwareTextureAndroid :: Boolean, shouldRasterizeIOS :: Boolean, size :: String, style :: CSS, testID :: String, tvParallaxMagnification :: Number, tvParallaxProperties :: { enabled :: Boolean, magnification :: Number, pressDelay :: Number, pressDuration :: Number, pressMagnification :: Number, shiftDistanceX :: Number, shiftDistanceY :: Number, tiltAngle :: Number }, tvParallaxShiftDistanceX :: Number, tvParallaxShiftDistanceY :: Number, tvParallaxTiltAngle :: Number)see https://facebook.github.io/react-native/docs/activityindicatorios.html#props
accessibilityActionsProvides an array of custom actions available for accessibility. platform iosaccessibilityComponentTypeIn some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on. platform androidaccessibilityElementsHiddenA Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader. platform iosaccessibilityHintAn accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.accessibilityIgnoresInvertColorshttps://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios platform iosaccessibilityLabelOverrides 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.accessibilityLiveRegionIndicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. platform androidaccessibilityRoleAccessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.accessibilityStatesAccessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.accessibilityTraitsAccessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits. platform iosaccessibilityViewIsModalA Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. platform iosaccessibleWhen true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.animatingWhether to show the indicator (true, the default) or hide it (false).collapsableViews that are only used to layout their children or otherwise don't draw anything may be automatically removed from the native hierarchy as an optimization. Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.colorThe foreground color of the spinner (default is gray).hasTVPreferredFocus(Apple TV only) May be set to true to force the Apple TV focus engine to move focus to this view. platform ioshidesWhenStoppedWhether the indicator should hide when not animating (true by default).hitSlopThis defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets that are at least 30 - 40 points/density-independent pixels. If a Touchable view has a height of 20 the touchable height can be extended to 40 with hitSlop={{top: 10, bottom: 10, left: 0, right: 0}} NOTE The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.importantForAccessibilityControls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. Possible values: 'auto' - The system determines whether the view is important for accessibility - default (recommended). 'yes' - The view is important for accessibility. 'no' - The view is not important for accessibility. 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.isTVSelectable(Apple TV only) When set to true, this view will be focusable and navigable using the Apple TV remote. platform iosnativeIDUsed to reference react managed views from native code.needsOffscreenAlphaCompositingWhether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. The default (false) falls back to drawing the component and its children with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. This default may be noticeable and undesired in the case where the View you are setting an opacity on has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background). Rendering offscreen to preserve correct alpha behavior is extremely expensive and hard to debug for non-native developers, which is why it is not turned on by default. If you do need to enable this property for an animation, consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). If that property is enabled, this View will be rendered off-screen once, saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU.onAccessibilityActionWhenaccessibleis true, the system will try to invoke this function when the user performs an accessibility custom action. platform iosonAccessibilityTapWhenaccessibleis true, the system will try to invoke this function when the user performs accessibility tap gesture. platform iosonLayoutInvoked on mount and layout changes withonMagicTapWhen accessible is true, the system will invoke this function when the user performs the magic tap gesture. platform iosonMoveShouldSetResponderCalled for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?onMoveShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.onResponderEndIf the View returns true and attempts to become the responder, one of the following will happen:onResponderGrantThe View is now responding for touch events. This is the time to highlight and show the user what is happeningonResponderMoveIf the view is responding, the following handlers can be called: The user is moving their fingeronResponderRejectSomething else is the responder right now and will not release itonResponderReleaseFired at the end of the touch, ie "touchUp"onResponderTerminateThe responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationRequest, or might be taken by the OS without asking (happens with control center/ notification center on iOS)onResponderTerminationRequestSomething else wants to become responder. Should this view release the responder? Returning true allows releaseonStartShouldSetResponderA view can become the touch responder by implementing the correct negotiation methods. There are two methods to ask the view if it wants to become responder: Does this view want to become responder on the start of a touch?onStartShouldSetResponderCaptureonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable. However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing onShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.pointerEventsIn the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class: .box-none { pointer-events: none; } .box-none * { pointer-events: all; } box-only is the equivalent of .box-only { pointer-events: all; } .box-only * { pointer-events: none; } But since pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform.removeClippedSubviewsThis is a special performance property exposed by RCTView and is useful for scrolling content when there are many subviews, most of which are offscreen. For this property to be effective, it must be applied to a view that contains many subviews that extend outside its bound. The subviews must also have overflow: hidden, as should the containing view (or one of its superviews).renderToHardwareTextureAndroidWhether this view should render itself (and all of its children) into a single hardware texture on the GPU. On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation.shouldRasterizeIOSWhether this view should be rendered as a bitmap before compositing. On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view and quickly composite it during each frame. Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. Test and measure when using this property.sizeSize of the indicator. Small has a height of 20, large has a height of 36. enum('small', 'large')testIDUsed to locate this view in end-to-end tests.tvParallaxMagnification(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 1.0. platform iostvParallaxProperties(Apple TV only) Object with properties to control Apple TV parallax effects. platform iostvParallaxShiftDistanceX(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxShiftDistanceY(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. platform iostvParallaxTiltAngle(Apple TV only) May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 0.05. platform ios
#ARTTextProps Source
type ARTTextProps = (alignment :: String, children :: Array JSX, fill :: String, font :: String, key :: String, opacity :: Number, originX :: Number, originY :: Number, scale :: Number, scaleX :: Number, scaleY :: Number, stroke :: String, strokeCap :: String, strokeDash :: Array Number, strokeJoin :: String, strokeWidth :: Number, title :: String, visible :: Boolean, x :: Number, y :: Number)#ARTSurfaceProps_required Source
type ARTSurfaceProps_required optional = (height :: Number, width :: Number | optional)#ARTSurfaceProps_optional Source
type ARTSurfaceProps_optional = (children :: Array JSX, key :: String, style :: CSS)#ARTShapeProps_required Source
type ARTShapeProps_required optional = (d :: String | optional)#ARTShapeProps_optional Source
type ARTShapeProps_optional = (children :: Array JSX, fill :: String, height :: Number, key :: String, opacity :: Number, originX :: Number, originY :: Number, scale :: Number, scaleX :: Number, scaleY :: Number, stroke :: String, strokeCap :: String, strokeDash :: Array Number, strokeJoin :: String, strokeWidth :: Number, title :: String, visible :: Boolean, width :: Number, x :: Number, y :: Number)#webView Source
webView :: forall attrs_ attrs. Union attrs attrs_ (WebViewProps) => Record attrs -> JSX#viewPagerAndroid Source
viewPagerAndroid :: forall attrs_ attrs. Union attrs attrs_ (ViewPagerAndroidProps) => Record attrs -> JSX#touchableWithoutFeedback Source
touchableWithoutFeedback :: forall attrs_ attrs. Union attrs attrs_ (TouchableWithoutFeedbackProps) => Record attrs -> JSX#touchableOpacity Source
touchableOpacity :: forall attrs_ attrs. Union attrs attrs_ (TouchableOpacityProps) => Record attrs -> JSX#touchableNativeFeedback Source
touchableNativeFeedback :: forall attrs_ attrs. Union attrs attrs_ (TouchableNativeFeedbackProps) => Record attrs -> JSX#touchableHighlight Source
touchableHighlight :: forall attrs_ attrs. Union attrs attrs_ (TouchableHighlightProps) => Record attrs -> JSX#toolbarAndroid Source
toolbarAndroid :: forall attrs_ attrs. Union attrs attrs_ (ToolbarAndroidProps) => Record attrs -> JSX#textInput Source
textInput :: forall attrs_ attrs. Union attrs attrs_ (TextInputProps) => Record attrs -> JSX#tabBarIOSItem Source
tabBarIOSItem :: forall attrs_ attrs. Union attrs attrs_ (TabBarIOSItemProps) => Record attrs -> JSX#tabBarIOS Source
tabBarIOS :: forall attrs_ attrs. Union attrs attrs_ (TabBarIOSProps) => Record attrs -> JSX#switchIOS Source
switchIOS :: forall attrs_ attrs. Union attrs attrs_ (SwitchIOSProps) => Record attrs -> JSX#switch Source
switch :: forall attrs_ attrs. Union attrs attrs_ (SwitchProps) => Record attrs -> JSX#swipeableListView Source
swipeableListView :: forall attrs_ attrs. Union attrs attrs_ (SwipeableListViewProps_optional) => Record ((SwipeableListViewProps_required) attrs) -> JSX#surface Source
surface :: forall attrs_ attrs. Union attrs attrs_ (ARTSurfaceProps_optional) => Record ((ARTSurfaceProps_required) attrs) -> JSX#statusBar Source
statusBar :: forall attrs_ attrs. Union attrs attrs_ (StatusBarProps) => Record attrs -> JSX#snapshotViewIOS Source
snapshotViewIOS :: forall attrs_ attrs. Union attrs attrs_ (SnapshotViewIOSProps_optional) => Record ((SnapshotViewIOSProps_required) attrs) -> JSX#slider Source
slider :: forall attrs_ attrs. Union attrs attrs_ (SliderProps) => Record attrs -> JSX#shape Source
shape :: forall attrs_ attrs. Union attrs attrs_ (ARTShapeProps_optional) => Record ((ARTShapeProps_required) attrs) -> JSX#segmentedControlIOS Source
segmentedControlIOS :: forall attrs_ attrs. Union attrs attrs_ (SegmentedControlIOSProps) => Record attrs -> JSX#scrollView Source
scrollView :: forall attrs_ attrs. Union attrs attrs_ (ScrollViewProps) => Record attrs -> JSX#safeAreaView Source
safeAreaView :: forall attrs_ attrs. Union attrs attrs_ (ViewProps) => Record attrs -> JSX#refreshControl Source
refreshControl :: forall attrs_ attrs. Union attrs attrs_ (RefreshControlProps_optional) => Record ((RefreshControlProps_required) attrs) -> JSX#recyclerViewBackedScrollView Source
recyclerViewBackedScrollView :: forall attrs_ attrs. Union attrs attrs_ (RecyclerViewBackedScrollViewProps) => Record attrs -> JSX#progressViewIOS Source
progressViewIOS :: forall attrs_ attrs. Union attrs attrs_ (ProgressViewIOSProps) => Record attrs -> JSX#progressBarAndroid Source
progressBarAndroid :: forall attrs_ attrs. Union attrs attrs_ (ProgressBarAndroidProps) => Record attrs -> JSX#pickerItem Source
pickerItem :: forall attrs_ attrs. Union attrs attrs_ (PickerItemProps_optional) => Record ((PickerItemProps_required) attrs) -> JSX#pickerIOSItem Source
pickerIOSItem :: forall attrs_ attrs. Union attrs attrs_ (PickerIOSItemProps) => Record attrs -> JSX#pickerIOS Source
pickerIOS :: forall attrs_ attrs. Union attrs attrs_ (PickerIOSProps) => Record attrs -> JSX#picker Source
picker :: forall attrs_ attrs. Union attrs attrs_ (PickerProps) => Record attrs -> JSX#maskedView Source
maskedView :: forall attrs_ attrs. Union attrs attrs_ (MaskedViewIOSProps_optional) => Record ((MaskedViewIOSProps_required) attrs) -> JSX#listView Source
listView :: forall attrs_ attrs. Union attrs attrs_ (ListViewProps_optional) => Record ((ListViewProps_required) attrs) -> JSX#keyboardAvoidingView Source
keyboardAvoidingView :: forall attrs_ attrs. Union attrs attrs_ (KeyboardAvoidingViewProps) => Record attrs -> JSX#inputAccessoryView Source
inputAccessoryView :: forall attrs_ attrs. Union attrs attrs_ (InputAccessoryViewProps) => Record attrs -> JSX#imageBackground Source
imageBackground :: forall attrs_ attrs. Union attrs attrs_ (ImageBackgroundProps_optional) => Record ((ImageBackgroundProps_required) attrs) -> JSX#image Source
image :: forall attrs_ attrs. Union attrs attrs_ (ImageProps_optional) => Record ((ImageProps_required) attrs) -> JSX#group Source
group :: forall attrs_ attrs. Union attrs attrs_ (ARTGroupProps) => Record attrs -> JSX#flatList Source
flatList :: forall itemT attrs_ attrs. Union attrs attrs_ (FlatListProps_optional itemT) => Record ((FlatListProps_required itemT) attrs) -> JSX#drawerLayoutAndroid Source
drawerLayoutAndroid :: forall attrs_ attrs. Union attrs attrs_ (DrawerLayoutAndroidProps_optional) => Record ((DrawerLayoutAndroidProps_required) attrs) -> JSX#datePickerIOS Source
datePickerIOS :: forall attrs_ attrs. Union attrs attrs_ (DatePickerIOSProps_optional) => Record ((DatePickerIOSProps_required) attrs) -> JSX#clippingRectangle Source
clippingRectangle :: forall attrs_ attrs. Union attrs attrs_ (ARTClippingRectangleProps) => Record attrs -> JSX#checkBox Source
checkBox :: forall attrs_ attrs. Union attrs attrs_ (CheckBoxProps) => Record attrs -> JSX#button Source
button :: forall attrs_ attrs. Union attrs attrs_ (ButtonProps_optional) => Record ((ButtonProps_required) attrs) -> JSX#activityIndicatorIOS Source
activityIndicatorIOS :: forall attrs_ attrs. Union attrs attrs_ (ActivityIndicatorIOSProps) => Record attrs -> JSX#activityIndicator Source
activityIndicator :: forall attrs_ attrs. Union attrs attrs_ (ActivityIndicatorProps) => Record attrs -> JSX