this repo has no description
1<!doctype html><html lang=en dir=ltr class="docs-wrapper plugin-docs plugin-id-default docs-version-0.79 docs-doc-page docs-doc-id-view" data-has-hydrated=false><meta charset=UTF-8><meta name=generator content="Docusaurus v3.8.0"><title data-rh=true>View · React Native</title><meta data-rh=true name=viewport content="width=device-width, initial-scale=1.0"><meta data-rh=true property=og:url content=https://reactnative.dev/docs/view><meta data-rh=true property=og:locale content=en><meta data-rh=true name=docusaurus_locale content=en><meta data-rh=true name=docsearch:language content=en><meta data-rh=true property=og:image content=https://reactnative.dev/img/logo-share.png><meta data-rh=true name=twitter:card content=summary_large_image><meta data-rh=true name=twitter:image content=https://reactnative.dev/img/logo-share.png><meta data-rh=true name=twitter:site content=@reactnative><meta data-rh=true name=docusaurus_version content=0.79><meta data-rh=true name=docusaurus_tag content=docs-default-0.79><meta data-rh=true name=docsearch:version content=0.79><meta data-rh=true name=docsearch:docusaurus_tag content=docs-default-0.79><meta data-rh=true property=og:title content="View · React Native"><meta data-rh=true name=description content="The most fundamental component for building a UI, View is a container that supports layout with flexbox, style, some touch handling, and accessibility controls. View maps directly to the native view equivalent on whatever platform React Native is running on, whether that is a UIView, `, android.view`, etc."><meta data-rh=true property=og:description content="The most fundamental component for building a UI, View is a container that supports layout with flexbox, style, some touch handling, and accessibility controls. View maps directly to the native view equivalent on whatever platform React Native is running on, whether that is a UIView, `, android.view`, etc."><link data-rh=true rel=icon href=/img/favicon.ico><link data-rh=true rel=canonical href=https://reactnative.dev/docs/view><link data-rh=true rel=alternate href=https://reactnative.dev/docs/view hreflang=en><link data-rh=true rel=alternate href=https://reactnative.dev/docs/view hreflang=x-default><link data-rh=true rel=preconnect href=https://8TDSE0OHGQ-dsn.algolia.net crossorigin=anonymous><link rel=alternate type=application/rss+xml href=/blog/rss.xml title="React Native RSS Feed"><link rel=alternate type=application/atom+xml href=/blog/atom.xml title="React Native Atom Feed"><link rel=alternate type=application/json href=/blog/feed.json title="React Native JSON Feed"><link rel=preconnect href=https://www.google-analytics.com><script>window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)},ga.l=+new Date,ga("create","UA-41298772-2","auto"),ga("send","pageview")</script><script async src=https://www.google-analytics.com/analytics.js></script><link rel=preconnect href=https://www.google-analytics.com><link rel=preconnect href=https://www.googletagmanager.com><script async src="https://www.googletagmanager.com/gtag/js?id=G-58L13S6BDP"></script><script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","G-58L13S6BDP",{})</script><link rel=search type=application/opensearchdescription+xml title="React Native" href=/opensearch.xml><link rel=icon href=/img/pwa/manifest-icon-512.png><link rel=manifest href=/manifest.json><meta name=theme-color content=#20232a><meta name=apple-mobile-web-app-capable content=yes><meta name=apple-mobile-web-app-status-bar-style content=#20232a><link rel=apple-touch-icon href=/img/pwa/manifest-icon-512.png><link rel=mask-icon href=/img/pwa/manifest-icon-512.png color=#06bcee><meta name=msapplication-TileImage href=/img/pwa/manifest-icon-512.png><meta name=msapplication-TileColor content=#20232a><script src=https://cdn.jsdelivr.net/npm/focus-visible@5.2.0/dist/focus-visible.min.js defer></script><script src=https://widget.surveymonkey.com/collect/website/js/tRaiETqnLgj758hTBazgd8ryO5qrZo8Exadq9qmt1wtm4_2FdZGEAKHDFEt_2BBlwwM4.js defer></script><script src=https://snack.expo.dev/embed.js defer></script><script src=https://platform.twitter.com/widgets.js async></script><link rel=stylesheet href=/assets/css/styles.883cb042.css><script src=/assets/js/runtime~main.8ac1e6f0.js defer></script><script src=/assets/js/main.341783f5.js defer></script><body class=navigation-with-keyboard><svg xmlns=http://www.w3.org/2000/svg style="display: none;"><defs>
2<symbol id=theme-svg-external-link viewBox="0 0 24 24"><path fill=currentColor d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"/></symbol>
3</defs></svg>
4<script>!function(){var t=function(){try{return new URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}}()||function(){try{return window.localStorage.getItem("theme")}catch(t){}}();document.documentElement.setAttribute("data-theme",t||(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light")),document.documentElement.setAttribute("data-theme-choice",t||"system")}(),function(){try{for(var[t,e]of new URLSearchParams(window.location.search).entries())if(t.startsWith("docusaurus-data-")){var a=t.replace("docusaurus-data-","data-");document.documentElement.setAttribute(a,e)}}catch(t){}}(),document.documentElement.setAttribute("data-announcement-bar-initially-dismissed",function(){try{return"true"===localStorage.getItem("docusaurus.announcement.dismiss")}catch(t){}return!1}())</script><div id=__docusaurus><div role=region aria-label="Skip to main content"><a class=skipToContent_oPtH href=#__docusaurus_skipToContent_fallback>Skip to main content</a></div><div class="theme-announcement-bar announcementBar_zJRd" style=background-color:#20232a;color:#fff role=banner><div class="content_bSb_ announcementBarContent_t7IR">Join us for React Conf on Oct 7-8. <a target=_blank rel="noopener noreferrer" href=https://conf.react.dev>Learn more</a>.</div></div><nav aria-label=Main class="theme-layout-navbar navbar navbar--fixed-top navbar--dark"><div class=navbar__inner><div class="theme-layout-navbar-left navbar__items"><button aria-label="Toggle navigation bar" aria-expanded=false class="navbar__toggle clean-btn" type=button><svg width=30 height=30 viewBox="0 0 30 30" aria-hidden=true><path stroke=currentColor stroke-linecap=round stroke-miterlimit=10 stroke-width=2 d="M4 7h22M4 15h22M4 23h22"/></svg></button><a class=navbar__brand href=/><div class=navbar__logo><img src=/img/header_logo.svg alt="React Native" class="themedComponent_siVc themedComponent--light_hHel"><img src=/img/header_logo.svg alt="React Native" class="themedComponent_siVc themedComponent--dark_yETr"></div><b class="navbar__title text--truncate">React Native</b></a><div class="navbar__item dropdown dropdown--hoverable"><a class=navbar__link aria-haspopup=true aria-expanded=false role=button href=/docs/view>0.79</a><ul class=dropdown__menu><li><a class=dropdown__link href=/docs/next/view>Next</a><li><a aria-current=page class="dropdown__link dropdown__link--active" href=/docs/view>0.79</a><li><a class=dropdown__link href=/docs/0.78/view>0.78</a><li><a class=dropdown__link href=/docs/0.77/view>0.77</a><li><a class=dropdown__link href=/docs/0.76/view>0.76</a><li><a class=dropdown__link href=/docs/0.75/view>0.75</a><li><a class=dropdown__link href=/docs/0.74/view>0.74</a><li><a class=dropdown__link href=/docs/0.73/view>0.73</a><li><a class=dropdown__link href=/docs/0.72/view>0.72</a><li><a class=dropdown__link href=/docs/0.71/view>0.71</a><li><a class=dropdown__link href=/docs/0.70/view>0.70</a><li><a class=dropdown__link href=/versions>All versions</a></ul></div></div><div class="theme-layout-navbar-right navbar__items navbar__items--right"><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href=# aria-haspopup=true aria-expanded=false role=button class=navbar__link>Development</a><ul class=dropdown__menu><li><a class=dropdown__link href=/docs/getting-started>Guides</a><li><a aria-current=page class="dropdown__link dropdown__link--active" href=/docs/components-and-apis>Components</a><li><a class=dropdown__link href=/docs/accessibilityinfo>APIs</a><li><a class=dropdown__link href=/architecture/overview>Architecture</a></ul></div><a class="navbar__item navbar__link" href=/contributing/overview>Contributing</a><a class="navbar__item navbar__link" href=/community/overview>Community</a><a class="navbar__item navbar__link" href=/showcase>Showcase</a><a class="navbar__item navbar__link" href=/blog>Blog</a><a href=https://github.com/facebook/react-native target=_blank rel="noopener noreferrer" class="navbar__item navbar__link navbar-github-link" aria-label="GitHub repository"></a><div class="toggle_ki11 colorModeToggle_Hewu"><button class="clean-btn toggleButton_MMFG toggleButtonDisabled_Uw7m darkNavbarColorModeToggle_m8pZ" type=button disabled title="system mode" aria-label="Switch between dark and light mode (currently system mode)"><svg viewBox="0 0 24 24" width=24 height=24 aria-hidden=true class="toggleIcon_k9hJ lightToggleIcon_lgto"><path fill=currentColor d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"/></svg><svg viewBox="0 0 24 24" width=24 height=24 aria-hidden=true class="toggleIcon_k9hJ darkToggleIcon_U96C"><path fill=currentColor d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"/></svg><svg viewBox="0 0 24 24" width=24 height=24 aria-hidden=true class="toggleIcon_k9hJ systemToggleIcon_E5c0"><path fill=currentColor d="m12 21c4.971 0 9-4.029 9-9s-4.029-9-9-9-9 4.029-9 9 4.029 9 9 9zm4.95-13.95c1.313 1.313 2.05 3.093 2.05 4.95s-0.738 3.637-2.05 4.95c-1.313 1.313-3.093 2.05-4.95 2.05v-14c1.857 0 3.637 0.737 4.95 2.05z"/></svg></button></div><div class=navbarSearchContainer_bzqh><button type=button class="DocSearch DocSearch-Button" aria-label="Search (Command+K)"><span class=DocSearch-Button-Container><svg width=20 height=20 class=DocSearch-Search-Icon viewBox="0 0 20 20" aria-hidden=true><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke=currentColor fill=none fill-rule=evenodd stroke-linecap=round stroke-linejoin=round /></svg><span class=DocSearch-Button-Placeholder>Search</span></span><span class=DocSearch-Button-Keys></span></button></div></div></div><div role=presentation class=navbar-sidebar__backdrop></div></nav><div id=__docusaurus_skipToContent_fallback class="theme-layout-main main-wrapper mainWrapper_MB5r"><div class=docsWrapper__sE8><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_iEvu" type=button></button><div class=docRoot_DfVB><aside class="theme-doc-sidebar-container docSidebarContainer_c7NB"><div class=sidebarViewport_KYo0><div class=sidebar_CUen><nav aria-label="Docs sidebar" class="menu thin-scrollbar menu_jmj1 menuWithAnnouncementBar_YufC"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class=menu__list-item-collapsible><a class="menu__link menu__link--sublist menu__link--sublist-caret menu__link--active" role=button aria-expanded=true href=/docs/components-and-apis>Core Components</a></div><ul class=menu__list><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class=menu__link tabindex=0 href=/docs/components-and-apis>Core Components and APIs</a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class=menu__link tabindex=0 href=/docs/activityindicator>ActivityIndicator</a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class=menu__link tabindex=0 href=/docs/button>Button</a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class=menu__link tabindex=0 href=/docs/flatlist>FlatList</a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class=menu__link tabindex=0 href=/docs/image>Image</a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class=menu__link tabindex=0 href=/docs/imagebackground>ImageBackground</a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class=menu__link tabindex=0 href=/docs/keyboardavoidingview>KeyboardAvoidingView</a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class=menu__link tabindex=0 href=/docs/modal>Modal</a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class=menu__link tabindex=0 href=/docs/pressable>Pressable</a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class=menu__link tabindex=0 href=/docs/refreshcontrol>RefreshControl</a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class=menu__link tabindex=0 href=/docs/scrollview>ScrollView</a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class=menu__link tabindex=0 href=/docs/sectionlist>SectionList</a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class=menu__link tabindex=0 href=/docs/statusbar>StatusBar</a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class=menu__link tabindex=0 href=/docs/switch>Switch</a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class=menu__link tabindex=0 href=/docs/text>Text</a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class=menu__link tabindex=0 href=/docs/textinput>TextInput</a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class=menu__link tabindex=0 href=/docs/touchablehighlight>TouchableHighlight</a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class=menu__link tabindex=0 href=/docs/touchableopacity>TouchableOpacity</a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class=menu__link tabindex=0 href=/docs/touchablewithoutfeedback>TouchableWithoutFeedback</a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current=page tabindex=0 href=/docs/view>View</a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class=menu__link tabindex=0 href=/docs/virtualizedlist>VirtualizedList</a><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item"><div class=menu__list-item-collapsible><a class="menu__link menu__link--sublist menu__link--sublist-caret" role=button aria-expanded=true tabindex=0 href=/docs/drawerlayoutandroid>Android Components</a></div><ul class=menu__list><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class=menu__link tabindex=0 href=/docs/drawerlayoutandroid>DrawerLayoutAndroid</a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class=menu__link tabindex=0 href=/docs/touchablenativefeedback>TouchableNativeFeedback</a></ul><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item"><div class=menu__list-item-collapsible><a class="menu__link menu__link--sublist menu__link--sublist-caret" role=button aria-expanded=true tabindex=0 href=/docs/inputaccessoryview>iOS Components</a></div><ul class=menu__list><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class=menu__link tabindex=0 href=/docs/inputaccessoryview>InputAccessoryView</a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class=menu__link tabindex=0 href=/docs/safeareaview>SafeAreaView</a></ul></ul><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class=menu__list-item-collapsible><a class="menu__link menu__link--sublist menu__link--sublist-caret" role=button aria-expanded=false href=/docs/image-style-props>Props</a></div><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class=menu__list-item-collapsible><a class="menu__link menu__link--sublist menu__link--sublist-caret" role=button aria-expanded=false href=/docs/boxshadowvalue>Object Types</a></div></ul></nav></div></div></aside><main class=docMainContainer_a9sJ><div class="container padding-top--md padding-bottom--lg"><div class=row><div class="col docItemCol_Qr34"><div class=docItemContainer_tjFy><article><div class="tocCollapsible_wXna theme-doc-toc-mobile tocMobile_Ojys"><button type=button class="clean-btn tocCollapsibleButton_iI2p">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>View</h1></header><p>The most fundamental component for building a UI, <code>View</code> is a container that supports layout with <a href=/docs/flexbox>flexbox</a>, <a href=/docs/style>style</a>, <a href=/docs/handling-touches>some touch handling</a>, and <a href=/docs/accessibility>accessibility</a> controls. <code>View</code> maps directly to the native view equivalent on whatever platform React Native is running on, whether that is a <code>UIView</code>, <code><div></code>, <code>android.view</code>, etc.</p>
5<p><code>View</code> is designed to be nested inside other views and can have 0 to many children of any type.</p>
6<p>This example creates a <code>View</code> that wraps two boxes with color and a text component in a row with padding.</p>
7<div class=snack-player data-snack-name="View Example" data-snack-description="Example usage" data-snack-files="%7B%22App.tsx%22%3A%7B%22type%22%3A%22CODE%22%2C%22contents%22%3A%22import%20React%20from%20'react'%3B%5Cnimport%20%7BView%2C%20Text%7D%20from%20'react-native'%3B%5Cnimport%20%7BSafeAreaView%2C%20SafeAreaProvider%7D%20from%20'react-native-safe-area-context'%3B%5Cn%5Cnconst%20ViewBoxesWithColorAndText%20%3D%20()%20%3D%3E%20%7B%5Cn%20%20return%20(%5Cn%20%20%20%20%3CSafeAreaProvider%3E%5Cn%20%20%20%20%20%20%3CSafeAreaView%20style%3D%7B%7Bheight%3A%20100%2C%20flexDirection%3A%20'row'%7D%7D%3E%5Cn%20%20%20%20%20%20%20%20%3CView%20style%3D%7B%7BbackgroundColor%3A%20'blue'%2C%20flex%3A%200.2%7D%7D%20%2F%3E%5Cn%20%20%20%20%20%20%20%20%3CView%20style%3D%7B%7BbackgroundColor%3A%20'red'%2C%20flex%3A%200.4%7D%7D%20%2F%3E%5Cn%20%20%20%20%20%20%20%20%3CText%3EHello%20World!%3C%2FText%3E%5Cn%20%20%20%20%20%20%3C%2FSafeAreaView%3E%5Cn%20%20%20%20%3C%2FSafeAreaProvider%3E%5Cn%20%20)%3B%5Cn%7D%3B%5Cn%5Cnexport%20default%20ViewBoxesWithColorAndText%3B%22%7D%7D" data-snack-dependencies=react-native-safe-area-context data-snack-platform=web data-snack-supported-platforms=ios,android,web data-snack-theme=light data-snack-preview=true data-snack-loading=lazy data-snack-device-frame=false></div>
8<blockquote>
9<p><code>View</code>s are designed to be used with <a href=/docs/style><code>StyleSheet</code></a> for clarity and performance, although inline styles are also supported.</p>
10</blockquote>
11<h3 class="anchor anchorWithStickyNavbar_JmGV" id=synthetic-touch-events>Synthetic Touch Events<a href=#synthetic-touch-events class=hash-link aria-label="Direct link to Synthetic Touch Events" title="Direct link to Synthetic Touch Events"></a></h3>
12<p>For <code>View</code> responder props (e.g., <code>onResponderMove</code>), the synthetic touch event passed to them are in form of <a href=/docs/pressevent>PressEvent</a>.</p>
13<hr>
14<h1>Reference</h1>
15<h2 class="anchor anchorWithStickyNavbar_JmGV" id=props>Props<a href=#props class=hash-link aria-label="Direct link to Props" title="Direct link to Props"></a></h2>
16<hr>
17<h3 class="anchor anchorWithStickyNavbar_JmGV" id=accessibilityactions><code>accessibilityActions</code><a href=#accessibilityactions class=hash-link aria-label="Direct link to accessibilityactions" title="Direct link to accessibilityactions"></a></h3>
18<p>Accessibility actions allow an assistive technology to programmatically invoke the actions of a component. The <code>accessibilityActions</code> property should contain a list of action objects. Each action object should contain the field name and label.</p>
19<p>See the <a href=/docs/accessibility#accessibility-actions>Accessibility guide</a> for more information.</p>
20<table><thead><tr><th>Type<tbody><tr><td>array</table>
21<hr>
22<h3 class="anchor anchorWithStickyNavbar_JmGV" id=accessibilityelementshidden-ios><code>accessibilityElementsHidden</code> <div class="label ios">iOS</div><a href=#accessibilityelementshidden-ios class=hash-link aria-label="Direct link to accessibilityelementshidden-ios" title="Direct link to accessibilityelementshidden-ios"></a></h3>
23<p>A value indicating whether the accessibility elements contained within this accessibility element are hidden. Default is <code>false</code>.</p>
24<p>See the <a href=/docs/accessibility#accessibilityelementshidden-ios>Accessibility guide</a> for more information.</p>
25<table><thead><tr><th>Type<tbody><tr><td>bool</table>
26<hr>
27<h3 class="anchor anchorWithStickyNavbar_JmGV" id=accessibilityhint><code>accessibilityHint</code><a href=#accessibilityhint class=hash-link aria-label="Direct link to accessibilityhint" title="Direct link to accessibilityhint"></a></h3>
28<p>An accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not clear from the accessibility label.</p>
29<table><thead><tr><th>Type<tbody><tr><td>string</table>
30<hr>
31<h3 class="anchor anchorWithStickyNavbar_JmGV" id=accessibilitylanguage-ios><code>accessibilityLanguage</code> <div class="label ios">iOS</div><a href=#accessibilitylanguage-ios class=hash-link aria-label="Direct link to accessibilitylanguage-ios" title="Direct link to accessibilitylanguage-ios"></a></h3>
32<p>A value indicating which language should be used by the screen reader when the user interacts with the element. It should follow the <a href=https://www.rfc-editor.org/info/bcp47 target=_blank rel="noopener noreferrer">BCP 47 specification</a>.</p>
33<p>See the <a href=https://developer.apple.com/documentation/objectivec/nsobject/1615192-accessibilitylanguage target=_blank rel="noopener noreferrer">iOS <code>accessibilityLanguage</code> doc</a> for more information.</p>
34<table><thead><tr><th>Type<tbody><tr><td>string</table>
35<hr>
36<h3 class="anchor anchorWithStickyNavbar_JmGV" id=accessibilityignoresinvertcolors-ios><code>accessibilityIgnoresInvertColors</code> <div class="label ios">iOS</div><a href=#accessibilityignoresinvertcolors-ios class=hash-link aria-label="Direct link to accessibilityignoresinvertcolors-ios" title="Direct link to accessibilityignoresinvertcolors-ios"></a></h3>
37<p>A value indicating this view should or should not be inverted when color inversion is turned on. A value of <code>true</code> will tell the view to not be inverted even if color inversion is turned on.</p>
38<p>See the <a href=/docs/accessibility#accessibilityignoresinvertcolors>Accessibility guide</a> for more information.</p>
39<table><thead><tr><th>Type<tbody><tr><td>bool</table>
40<hr>
41<h3 class="anchor anchorWithStickyNavbar_JmGV" id=accessibilitylabel><code>accessibilityLabel</code><a href=#accessibilitylabel class=hash-link aria-label="Direct link to accessibilitylabel" title="Direct link to accessibilitylabel"></a></h3>
42<p>Overrides the text that's read by the screen reader when the user interacts with the element. By default, the label is constructed by traversing all the children and accumulating all the <code>Text</code> nodes separated by space.</p>
43<table><thead><tr><th>Type<tbody><tr><td>string</table>
44<hr>
45<h3 class="anchor anchorWithStickyNavbar_JmGV" id=accessibilityliveregion-android><code>accessibilityLiveRegion</code> <div class="label android">Android</div><a href=#accessibilityliveregion-android class=hash-link aria-label="Direct link to accessibilityliveregion-android" title="Direct link to accessibilityliveregion-android"></a></h3>
46<p>Indicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. Possible values:</p>
47<ul>
48<li><code>'none'</code> - Accessibility services should not announce changes to this view.</li>
49<li><code>'polite'</code>- Accessibility services should announce changes to this view.</li>
50<li><code>'assertive'</code> - Accessibility services should interrupt ongoing speech to immediately announce changes to this view.</li>
51</ul>
52<p>See the <a href=https://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion target=_blank rel="noopener noreferrer">Android <code>View</code> docs</a> for reference.</p>
53<table><thead><tr><th>Type<tbody><tr><td>enum('none', 'polite', 'assertive')</table>
54<hr>
55<h3 class="anchor anchorWithStickyNavbar_JmGV" id=accessibilityrole><code>accessibilityRole</code><a href=#accessibilityrole class=hash-link aria-label="Direct link to accessibilityrole" title="Direct link to accessibilityrole"></a></h3>
56<p><code>accessibilityRole</code> communicates the purpose of a component to the user of an assistive technology.</p>
57<p><code>accessibilityRole</code> can be one of the following:</p>
58<ul>
59<li><code>'none'</code> - Used when the element has no role.</li>
60<li><code>'button'</code> - Used when the element should be treated as a button.</li>
61<li><code>'link'</code> - Used when the element should be treated as a link.</li>
62<li><code>'search'</code> - Used when the text field element should also be treated as a search field.</li>
63<li><code>'image'</code> - Used when the element should be treated as an image. Can be combined with button or link, for example.</li>
64<li><code>'keyboardkey'</code> - Used when the element acts as a keyboard key.</li>
65<li><code>'text'</code> - Used when the element should be treated as static text that cannot change.</li>
66<li><code>'adjustable'</code> - Used when an element can be "adjusted" (e.g. a slider).</li>
67<li><code>'imagebutton'</code> - Used when the element should be treated as a button and is also an image.</li>
68<li><code>'header'</code> - Used when an element acts as a header for a content section (e.g. the title of a navigation bar).</li>
69<li><code>'summary'</code> - Used when an element can be used to provide a quick summary of current conditions in the app when the app first launches.</li>
70<li><code>'alert'</code> - Used when an element contains important text to be presented to the user.</li>
71<li><code>'checkbox'</code> - Used when an element represents a checkbox which can be checked, unchecked, or have mixed checked state.</li>
72<li><code>'combobox'</code> - Used when an element represents a combo box, which allows the user to select among several choices.</li>
73<li><code>'menu'</code> - Used when the component is a menu of choices.</li>
74<li><code>'menubar'</code> - Used when a component is a container of multiple menus.</li>
75<li><code>'menuitem'</code> - Used to represent an item within a menu.</li>
76<li><code>'progressbar'</code> - Used to represent a component which indicates progress of a task.</li>
77<li><code>'radio'</code> - Used to represent a radio button.</li>
78<li><code>'radiogroup'</code> - Used to represent a group of radio buttons.</li>
79<li><code>'scrollbar'</code> - Used to represent a scroll bar.</li>
80<li><code>'spinbutton'</code> - Used to represent a button which opens a list of choices.</li>
81<li><code>'switch'</code> - Used to represent a switch which can be turned on and off.</li>
82<li><code>'tab'</code> - Used to represent a tab.</li>
83<li><code>'tablist'</code> - Used to represent a list of tabs.</li>
84<li><code>'timer'</code> - Used to represent a timer.</li>
85<li><code>'toolbar'</code> - Used to represent a tool bar (a container of action buttons or components).</li>
86<li><code>'grid'</code> - Used with ScrollView, VirtualizedList, FlatList, or SectionList to represent a grid. Adds the in/out of grid announcements to the android GridView.</li>
87</ul>
88<table><thead><tr><th>Type<tbody><tr><td>string</table>
89<hr>
90<h3 class="anchor anchorWithStickyNavbar_JmGV" id=accessibilitystate><code>accessibilityState</code><a href=#accessibilitystate class=hash-link aria-label="Direct link to accessibilitystate" title="Direct link to accessibilitystate"></a></h3>
91<p>Describes the current state of a component to the user of an assistive technology.</p>
92<p>See the <a href=/docs/accessibility#accessibilitystate-ios-android>Accessibility guide</a> for more information.</p>
93<table><thead><tr><th>Type<tbody><tr><td>object: <code>{disabled: bool, selected: bool, checked: bool or 'mixed', busy: bool, expanded: bool}</code></table>
94<hr>
95<h3 class="anchor anchorWithStickyNavbar_JmGV" id=accessibilityvalue><code>accessibilityValue</code><a href=#accessibilityvalue class=hash-link aria-label="Direct link to accessibilityvalue" title="Direct link to accessibilityvalue"></a></h3>
96<p>Represents the current value of a component. It can be a textual description of a component's value, or for range-based components, such as sliders and progress bars, it contains range information (minimum, current, and maximum).</p>
97<p>See the <a href=/docs/accessibility#accessibilityvalue-ios-android>Accessibility guide</a> for more information.</p>
98<table><thead><tr><th>Type<tbody><tr><td>object: <code>{min: number, max: number, now: number, text: string}</code></table>
99<hr>
100<h3 class="anchor anchorWithStickyNavbar_JmGV" id=accessibilityviewismodal-ios><code>accessibilityViewIsModal</code> <div class="label ios">iOS</div><a href=#accessibilityviewismodal-ios class=hash-link aria-label="Direct link to accessibilityviewismodal-ios" title="Direct link to accessibilityviewismodal-ios"></a></h3>
101<p>A value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. Default is <code>false</code>.</p>
102<p>See the <a href=/docs/accessibility#accessibilityviewismodal-ios>Accessibility guide</a> for more information.</p>
103<table><thead><tr><th>Type<tbody><tr><td>bool</table>
104<hr>
105<h3 class="anchor anchorWithStickyNavbar_JmGV" id=accessible><code>accessible</code><a href=#accessible class=hash-link aria-label="Direct link to accessible" title="Direct link to accessible"></a></h3>
106<p>When <code>true</code>, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.</p>
107<hr>
108<h3 class="anchor anchorWithStickyNavbar_JmGV" id=aria-busy><code>aria-busy</code><a href=#aria-busy class=hash-link aria-label="Direct link to aria-busy" title="Direct link to aria-busy"></a></h3>
109<p>Indicates an element is being modified and that assistive technologies may want to wait until the changes are complete before informing the user about the update.</p>
110<table><thead><tr><th>Type<th>Default<tbody><tr><td>boolean<td>false</table>
111<hr>
112<h3 class="anchor anchorWithStickyNavbar_JmGV" id=aria-checked><code>aria-checked</code><a href=#aria-checked class=hash-link aria-label="Direct link to aria-checked" title="Direct link to aria-checked"></a></h3>
113<p>Indicates the state of a checkable element. This field can either take a boolean or the "mixed" string to represent mixed checkboxes.</p>
114<table><thead><tr><th>Type<th>Default<tbody><tr><td>boolean, 'mixed'<td>false</table>
115<hr>
116<h3 class="anchor anchorWithStickyNavbar_JmGV" id=aria-disabled><code>aria-disabled</code><a href=#aria-disabled class=hash-link aria-label="Direct link to aria-disabled" title="Direct link to aria-disabled"></a></h3>
117<p>Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.</p>
118<table><thead><tr><th>Type<th>Default<tbody><tr><td>boolean<td>false</table>
119<hr>
120<h3 class="anchor anchorWithStickyNavbar_JmGV" id=aria-expanded><code>aria-expanded</code><a href=#aria-expanded class=hash-link aria-label="Direct link to aria-expanded" title="Direct link to aria-expanded"></a></h3>
121<p>Indicates whether an expandable element is currently expanded or collapsed.</p>
122<table><thead><tr><th>Type<th>Default<tbody><tr><td>boolean<td>false</table>
123<hr>
124<h3 class="anchor anchorWithStickyNavbar_JmGV" id=aria-hidden><code>aria-hidden</code><a href=#aria-hidden class=hash-link aria-label="Direct link to aria-hidden" title="Direct link to aria-hidden"></a></h3>
125<p>Indicates whether the accessibility elements contained within this accessibility element are hidden.</p>
126<p>For example, in a window that contains sibling views <code>A</code> and <code>B</code>, setting <code>aria-hidden</code> to <code>true</code> on view <code>B</code> causes VoiceOver to ignore the elements in the view <code>B</code>.</p>
127<table><thead><tr><th>Type<th>Default<tbody><tr><td>boolean<td>false</table>
128<hr>
129<h3 class="anchor anchorWithStickyNavbar_JmGV" id=aria-label><code>aria-label</code><a href=#aria-label class=hash-link aria-label="Direct link to aria-label" title="Direct link to aria-label"></a></h3>
130<p>Defines a string value that labels an interactive element.</p>
131<table><thead><tr><th>Type<tbody><tr><td>string</table>
132<hr>
133<h3 class="anchor anchorWithStickyNavbar_JmGV" id=aria-labelledby-android><code>aria-labelledby</code> <div class="label android">Android</div><a href=#aria-labelledby-android class=hash-link aria-label="Direct link to aria-labelledby-android" title="Direct link to aria-labelledby-android"></a></h3>
134<p>Identifies the element that labels the element it is applied to. The value of <code>aria-labelledby</code> should match the <a href=/docs/view#nativeid><code>nativeID</code></a> of the related element:</p>
135<div class="language-tsx codeBlockContainer_mQmQ theme-code-block" style=--prism-color:#FFFFFF;--prism-background-color:#282C34><div class=codeBlockTitle_kY6l>tsx</div><div class=codeBlockContent_t_Hd><pre tabindex=0 class="prism-code language-tsx codeBlock_RMoD thin-scrollbar" style=color:#FFFFFF;background-color:#282C34><code class=codeBlockLines_AclH><span class=token-line style=color:#FFFFFF><span class="token tag punctuation" style=color:#657b83><</span><span class="token tag class-name" style=color:#fac863>View</span><span class="token tag punctuation" style=color:#657b83>></span><span class="token plain-text"></span><br></span><span class=token-line style=color:#FFFFFF><span class="token plain-text"> </span><span class="token tag punctuation" style=color:#657b83><</span><span class="token tag class-name" style=color:#fac863>Text</span><span class="token tag" style=color:#fc929e> </span><span class="token tag attr-name" style=color:#c5a5c5>nativeID</span><span class="token tag attr-value punctuation attr-equals" style=color:#657b83>=</span><span class="token tag attr-value punctuation" style=color:#657b83>"</span><span class="token tag attr-value" style=color:#8dc891>formLabel</span><span class="token tag attr-value punctuation" style=color:#657b83>"</span><span class="token tag punctuation" style=color:#657b83>></span><span class="token plain-text">Label for Input Field</span><span class="token tag punctuation" style=color:#657b83></</span><span class="token tag class-name" style=color:#fac863>Text</span><span class="token tag punctuation" style=color:#657b83>></span><span class="token plain-text"></span><br></span><span class=token-line style=color:#FFFFFF><span class="token plain-text"> </span><span class="token tag punctuation" style=color:#657b83><</span><span class="token tag class-name" style=color:#fac863>TextInput</span><span class="token tag" style=color:#fc929e> </span><span class="token tag attr-name" style=color:#c5a5c5>aria-label</span><span class="token tag attr-value punctuation attr-equals" style=color:#657b83>=</span><span class="token tag attr-value punctuation" style=color:#657b83>"</span><span class="token tag attr-value" style=color:#8dc891>input</span><span class="token tag attr-value punctuation" style=color:#657b83>"</span><span class="token tag" style=color:#fc929e> </span><span class="token tag attr-name" style=color:#c5a5c5>aria-labelledby</span><span class="token tag attr-value punctuation attr-equals" style=color:#657b83>=</span><span class="token tag attr-value punctuation" style=color:#657b83>"</span><span class="token tag attr-value" style=color:#8dc891>formLabel</span><span class="token tag attr-value punctuation" style=color:#657b83>"</span><span class="token tag" style=color:#fc929e> </span><span class="token tag punctuation" style=color:#657b83>/></span><span class="token plain-text"></span><br></span><span class=token-line style=color:#FFFFFF><span class="token plain-text"></span><span class="token tag punctuation" style=color:#657b83></</span><span class="token tag class-name" style=color:#fac863>View</span><span class="token tag punctuation" style=color:#657b83>></span><br></span></code></pre></div></div>
136<table><thead><tr><th>Type<tbody><tr><td>string</table>
137<hr>
138<h3 class="anchor anchorWithStickyNavbar_JmGV" id=aria-live-android><code>aria-live</code> <div class="label android">Android</div><a href=#aria-live-android class=hash-link aria-label="Direct link to aria-live-android" title="Direct link to aria-live-android"></a></h3>
139<p>Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.</p>
140<ul>
141<li><strong>off</strong> Accessibility services should not announce changes to this view.</li>
142<li><strong>polite</strong> Accessibility services should announce changes to this view.</li>
143<li><strong>assertive</strong> Accessibility services should interrupt ongoing speech to immediately announce changes to this view.</li>
144</ul>
145<table><thead><tr><th>Type<th>Default<tbody><tr><td>enum(<code>'assertive'</code>, <code>'off'</code>, <code>'polite'</code>)<td><code>'off'</code></table>
146<hr>
147<h3 class="anchor anchorWithStickyNavbar_JmGV" id=aria-modal-ios><code>aria-modal</code> <div class="label ios">iOS</div><a href=#aria-modal-ios class=hash-link aria-label="Direct link to aria-modal-ios" title="Direct link to aria-modal-ios"></a></h3>
148<p>Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. Has precedence over the <a href=#accessibilityviewismodal-ios><code>accessibilityViewIsModal</code></a> prop.</p>
149<table><thead><tr><th>Type<th>Default<tbody><tr><td>boolean<td>false</table>
150<hr>
151<h3 class="anchor anchorWithStickyNavbar_JmGV" id=aria-selected><code>aria-selected</code><a href=#aria-selected class=hash-link aria-label="Direct link to aria-selected" title="Direct link to aria-selected"></a></h3>
152<p>Indicates whether a selectable element is currently selected or not.</p>
153<table><thead><tr><th>Type<tbody><tr><td>boolean</table>
154<h3 class="anchor anchorWithStickyNavbar_JmGV" id=aria-valuemax><code>aria-valuemax</code><a href=#aria-valuemax class=hash-link aria-label="Direct link to aria-valuemax" title="Direct link to aria-valuemax"></a></h3>
155<p>Represents the maximum value for range-based components, such as sliders and progress bars. Has precedence over the <code>max</code> value in the <code>accessibilityValue</code> prop.</p>
156<table><thead><tr><th>Type<tbody><tr><td>number</table>
157<hr>
158<h3 class="anchor anchorWithStickyNavbar_JmGV" id=aria-valuemin><code>aria-valuemin</code><a href=#aria-valuemin class=hash-link aria-label="Direct link to aria-valuemin" title="Direct link to aria-valuemin"></a></h3>
159<p>Represents the minimum value for range-based components, such as sliders and progress bars. Has precedence over the <code>min</code> value in the <code>accessibilityValue</code> prop.</p>
160<table><thead><tr><th>Type<tbody><tr><td>number</table>
161<hr>
162<h3 class="anchor anchorWithStickyNavbar_JmGV" id=aria-valuenow><code>aria-valuenow</code><a href=#aria-valuenow class=hash-link aria-label="Direct link to aria-valuenow" title="Direct link to aria-valuenow"></a></h3>
163<p>Represents the current value for range-based components, such as sliders and progress bars. Has precedence over the <code>now</code> value in the <code>accessibilityValue</code> prop.</p>
164<table><thead><tr><th>Type<tbody><tr><td>number</table>
165<hr>
166<h3 class="anchor anchorWithStickyNavbar_JmGV" id=aria-valuetext><code>aria-valuetext</code><a href=#aria-valuetext class=hash-link aria-label="Direct link to aria-valuetext" title="Direct link to aria-valuetext"></a></h3>
167<p>Represents the textual description of the component. Has precedence over the <code>text</code> value in the <code>accessibilityValue</code> prop.</p>
168<table><thead><tr><th>Type<tbody><tr><td>string</table>
169<hr>
170<h3 class="anchor anchorWithStickyNavbar_JmGV" id=collapsable><code>collapsable</code><a href=#collapsable class=hash-link aria-label="Direct link to collapsable" title="Direct link to collapsable"></a></h3>
171<p>Views 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 <code>false</code> to disable this optimization and ensure that this <code>View</code> exists in the native view hierarchy.</p>
172<table><thead><tr><th>Type<th>Default<tbody><tr><td>boolean<td>true</table>
173<hr>
174<h3 class="anchor anchorWithStickyNavbar_JmGV" id=collapsablechildren><code>collapsableChildren</code><a href=#collapsablechildren class=hash-link aria-label="Direct link to collapsablechildren" title="Direct link to collapsablechildren"></a></h3>
175<p>Setting to false prevents direct children of the view from being removed from the native view hierarchy, similar to the effect of setting <code>collapsable={false}</code> on each child.</p>
176<table><thead><tr><th>Type<th>Default<tbody><tr><td>boolean<td>true</table>
177<hr>
178<h3 class="anchor anchorWithStickyNavbar_JmGV" id=focusable-android><code>focusable</code> <div class="label android">Android</div><a href=#focusable-android class=hash-link aria-label="Direct link to focusable-android" title="Direct link to focusable-android"></a></h3>
179<p>Whether this <code>View</code> should be focusable with a non-touch input device, eg. receive focus with a hardware keyboard.</p>
180<table><thead><tr><th>Type<tbody><tr><td>boolean</table>
181<hr>
182<h3 class="anchor anchorWithStickyNavbar_JmGV" id=hitslop><code>hitSlop</code><a href=#hitslop class=hash-link aria-label="Direct link to hitslop" title="Direct link to hitslop"></a></h3>
183<p>This 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.</p>
184<p>For example, if a touchable view has a height of 20 the touchable height can be extended to 40 with <code>hitSlop={{top: 10, bottom: 10, left: 0, right: 0}}</code></p>
185<blockquote>
186<p>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.</p>
187</blockquote>
188<table><thead><tr><th>Type<tbody><tr><td>object: <code>{top: number, left: number, bottom: number, right: number}</code></table>
189<hr>
190<h3 class="anchor anchorWithStickyNavbar_JmGV" id=id><code>id</code><a href=#id class=hash-link aria-label="Direct link to id" title="Direct link to id"></a></h3>
191<p>Used to locate this view from native classes. Has precedence over <code>nativeID</code> prop.</p>
192<blockquote>
193<p>This disables the 'layout-only view removal' optimization for this view!</p>
194</blockquote>
195<table><thead><tr><th>Type<tbody><tr><td>string</table>
196<hr>
197<h3 class="anchor anchorWithStickyNavbar_JmGV" id=importantforaccessibility-android><code>importantForAccessibility</code> <div class="label android">Android</div><a href=#importantforaccessibility-android class=hash-link aria-label="Direct link to importantforaccessibility-android" title="Direct link to importantforaccessibility-android"></a></h3>
198<p>Controls 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.</p>
199<p>Possible values:</p>
200<ul>
201<li><code>'auto'</code> - The system determines whether the view is important for accessibility - default (recommended).</li>
202<li><code>'yes'</code> - The view is important for accessibility.</li>
203<li><code>'no'</code> - The view is not important for accessibility.</li>
204<li><code>'no-hide-descendants'</code> - The view is not important for accessibility, nor are any of its descendant views.</li>
205</ul>
206<p>See the <a href=https://developer.android.com/reference/android/R.attr.html#importantForAccessibility target=_blank rel="noopener noreferrer">Android <code>importantForAccessibility</code> docs</a> for reference.</p>
207<table><thead><tr><th>Type<tbody><tr><td>enum('auto', 'yes', 'no', 'no-hide-descendants')</table>
208<hr>
209<h3 class="anchor anchorWithStickyNavbar_JmGV" id=nativeid><code>nativeID</code><a href=#nativeid class=hash-link aria-label="Direct link to nativeid" title="Direct link to nativeid"></a></h3>
210<p>Used to locate this view from native classes.</p>
211<blockquote>
212<p>This disables the 'layout-only view removal' optimization for this view!</p>
213</blockquote>
214<table><thead><tr><th>Type<tbody><tr><td>string</table>
215<hr>
216<h3 class="anchor anchorWithStickyNavbar_JmGV" id=needsoffscreenalphacompositing><code>needsOffscreenAlphaCompositing</code><a href=#needsoffscreenalphacompositing class=hash-link aria-label="Direct link to needsoffscreenalphacompositing" title="Direct link to needsoffscreenalphacompositing"></a></h3>
217<p>Whether this <code>View</code> needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. The default (<code>false</code>) 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 <code>View</code> you are setting an opacity on has multiple overlapping elements (e.g. multiple overlapping <code>View</code>s, or text and a background).</p>
218<p>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 <strong>contents</strong> 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.</p>
219<table><thead><tr><th>Type<tbody><tr><td>bool</table>
220<hr>
221<h3 class="anchor anchorWithStickyNavbar_JmGV" id=nextfocusdown-android><code>nextFocusDown</code> <div class="label android">Android</div><a href=#nextfocusdown-android class=hash-link aria-label="Direct link to nextfocusdown-android" title="Direct link to nextfocusdown-android"></a></h3>
222<p>Designates the next view to receive focus when the user navigates down. See the <a href=https://developer.android.com/reference/android/view/View.html#attr_android:nextFocusDown target=_blank rel="noopener noreferrer">Android documentation</a>.</p>
223<table><thead><tr><th>Type<tbody><tr><td>number</table>
224<hr>
225<h3 class="anchor anchorWithStickyNavbar_JmGV" id=nextfocusforward-android><code>nextFocusForward</code> <div class="label android">Android</div><a href=#nextfocusforward-android class=hash-link aria-label="Direct link to nextfocusforward-android" title="Direct link to nextfocusforward-android"></a></h3>
226<p>Designates the next view to receive focus when the user navigates forward. See the <a href=https://developer.android.com/reference/android/view/View.html#attr_android:nextFocusForward target=_blank rel="noopener noreferrer">Android documentation</a>.</p>
227<table><thead><tr><th>Type<tbody><tr><td>number</table>
228<hr>
229<h3 class="anchor anchorWithStickyNavbar_JmGV" id=nextfocusleft-android><code>nextFocusLeft</code> <div class="label android">Android</div><a href=#nextfocusleft-android class=hash-link aria-label="Direct link to nextfocusleft-android" title="Direct link to nextfocusleft-android"></a></h3>
230<p>Designates the next view to receive focus when the user navigates left. See the <a href=https://developer.android.com/reference/android/view/View.html#attr_android:nextFocusLeft target=_blank rel="noopener noreferrer">Android documentation</a>.</p>
231<table><thead><tr><th>Type<tbody><tr><td>number</table>
232<hr>
233<h3 class="anchor anchorWithStickyNavbar_JmGV" id=nextfocusright-android><code>nextFocusRight</code> <div class="label android">Android</div><a href=#nextfocusright-android class=hash-link aria-label="Direct link to nextfocusright-android" title="Direct link to nextfocusright-android"></a></h3>
234<p>Designates the next view to receive focus when the user navigates right. See the <a href=https://developer.android.com/reference/android/view/View.html#attr_android:nextFocusRight target=_blank rel="noopener noreferrer">Android documentation</a>.</p>
235<table><thead><tr><th>Type<tbody><tr><td>number</table>
236<hr>
237<h3 class="anchor anchorWithStickyNavbar_JmGV" id=nextfocusup-android><code>nextFocusUp</code> <div class="label android">Android</div><a href=#nextfocusup-android class=hash-link aria-label="Direct link to nextfocusup-android" title="Direct link to nextfocusup-android"></a></h3>
238<p>Designates the next view to receive focus when the user navigates up. See the <a href=https://developer.android.com/reference/android/view/View.html#attr_android:nextFocusUp target=_blank rel="noopener noreferrer">Android documentation</a>.</p>
239<table><thead><tr><th>Type<tbody><tr><td>number</table>
240<hr>
241<h3 class="anchor anchorWithStickyNavbar_JmGV" id=onaccessibilityaction><code>onAccessibilityAction</code><a href=#onaccessibilityaction class=hash-link aria-label="Direct link to onaccessibilityaction" title="Direct link to onaccessibilityaction"></a></h3>
242<p>Invoked when the user performs the accessibility actions. The only argument to this function is an event containing the name of the action to perform.</p>
243<p>See the <a href=/docs/accessibility#accessibility-actions>Accessibility guide</a> for more information.</p>
244<table><thead><tr><th>Type<tbody><tr><td>function</table>
245<hr>
246<h3 class="anchor anchorWithStickyNavbar_JmGV" id=onaccessibilityescape-ios><code>onAccessibilityEscape</code> <div class="label ios">iOS</div><a href=#onaccessibilityescape-ios class=hash-link aria-label="Direct link to onaccessibilityescape-ios" title="Direct link to onaccessibilityescape-ios"></a></h3>
247<p>When <code>accessible</code> is <code>true</code>, the system will invoke this function when the user performs the escape gesture.</p>
248<table><thead><tr><th>Type<tbody><tr><td>function</table>
249<hr>
250<h3 class="anchor anchorWithStickyNavbar_JmGV" id=onaccessibilitytap-ios><code>onAccessibilityTap</code> <div class="label ios">iOS</div><a href=#onaccessibilitytap-ios class=hash-link aria-label="Direct link to onaccessibilitytap-ios" title="Direct link to onaccessibilitytap-ios"></a></h3>
251<p>When <code>accessible</code> is true, the system will try to invoke this function when the user performs accessibility tap gesture.</p>
252<table><thead><tr><th>Type<tbody><tr><td>function</table>
253<hr>
254<h3 class="anchor anchorWithStickyNavbar_JmGV" id=onlayout><code>onLayout</code><a href=#onlayout class=hash-link aria-label="Direct link to onlayout" title="Direct link to onlayout"></a></h3>
255<p>Invoked on mount and on layout changes.</p>
256<p>This event is fired immediately once the layout has been calculated, but the new layout may not yet be reflected on the screen at the time the event is received, especially if a layout animation is in progress.</p>
257<table><thead><tr><th>Type<tbody><tr><td><code>({nativeEvent: <a href=/docs/layoutevent>LayoutEvent</a>}) => void</code></table>
258<hr>
259<h3 class="anchor anchorWithStickyNavbar_JmGV" id=onmagictap-ios><code>onMagicTap</code> <div class="label ios">iOS</div><a href=#onmagictap-ios class=hash-link aria-label="Direct link to onmagictap-ios" title="Direct link to onmagictap-ios"></a></h3>
260<p>When <code>accessible</code> is <code>true</code>, the system will invoke this function when the user performs the magic tap gesture.</p>
261<table><thead><tr><th>Type<tbody><tr><td>function</table>
262<hr>
263<h3 class="anchor anchorWithStickyNavbar_JmGV" id=onmoveshouldsetresponder><code>onMoveShouldSetResponder</code><a href=#onmoveshouldsetresponder class=hash-link aria-label="Direct link to onmoveshouldsetresponder" title="Direct link to onmoveshouldsetresponder"></a></h3>
264<p>Does this view want to "claim" touch responsiveness? This is called for every touch move on the <code>View</code> when it is not the responder.</p>
265<table><thead><tr><th>Type<tbody><tr><td><code>({nativeEvent: <a href=/docs/pressevent>PressEvent</a>}) => boolean</code></table>
266<hr>
267<h3 class="anchor anchorWithStickyNavbar_JmGV" id=onmoveshouldsetrespondercapture><code>onMoveShouldSetResponderCapture</code><a href=#onmoveshouldsetrespondercapture class=hash-link aria-label="Direct link to onmoveshouldsetrespondercapture" title="Direct link to onmoveshouldsetrespondercapture"></a></h3>
268<p>If a parent <code>View</code> wants to prevent a child <code>View</code> from becoming responder on a move, it should have this handler which returns <code>true</code>.</p>
269<table><thead><tr><th>Type<tbody><tr><td><code>({nativeEvent: <a href=/docs/pressevent>PressEvent</a>}) => boolean</code></table>
270<hr>
271<h3 class="anchor anchorWithStickyNavbar_JmGV" id=onrespondergrant><code>onResponderGrant</code><a href=#onrespondergrant class=hash-link aria-label="Direct link to onrespondergrant" title="Direct link to onrespondergrant"></a></h3>
272<p>The View is now responding for touch events. This is the time to highlight and show the user what is happening.</p>
273<p>On Android, return true from this callback to prevent any other native components from becoming responder until this responder terminates.</p>
274<table><thead><tr><th>Type<tbody><tr><td><code>({nativeEvent: <a href=/docs/pressevent>PressEvent</a>}) => void | boolean</code></table>
275<hr>
276<h3 class="anchor anchorWithStickyNavbar_JmGV" id=onrespondermove><code>onResponderMove</code><a href=#onrespondermove class=hash-link aria-label="Direct link to onrespondermove" title="Direct link to onrespondermove"></a></h3>
277<p>The user is moving their finger.</p>
278<table><thead><tr><th>Type<tbody><tr><td><code>({nativeEvent: <a href=/docs/pressevent>PressEvent</a>}) => void</code></table>
279<hr>
280<h3 class="anchor anchorWithStickyNavbar_JmGV" id=onresponderreject><code>onResponderReject</code><a href=#onresponderreject class=hash-link aria-label="Direct link to onresponderreject" title="Direct link to onresponderreject"></a></h3>
281<p>Another responder is already active and will not release it to that <code>View</code> asking to be the responder.</p>
282<table><thead><tr><th>Type<tbody><tr><td><code>({nativeEvent: <a href=/docs/pressevent>PressEvent</a>}) => void</code></table>
283<hr>
284<h3 class="anchor anchorWithStickyNavbar_JmGV" id=onresponderrelease><code>onResponderRelease</code><a href=#onresponderrelease class=hash-link aria-label="Direct link to onresponderrelease" title="Direct link to onresponderrelease"></a></h3>
285<p>Fired at the end of the touch.</p>
286<table><thead><tr><th>Type<tbody><tr><td><code>({nativeEvent: <a href=/docs/pressevent>PressEvent</a>}) => void</code></table>
287<hr>
288<h3 class="anchor anchorWithStickyNavbar_JmGV" id=onresponderterminate><code>onResponderTerminate</code><a href=#onresponderterminate class=hash-link aria-label="Direct link to onresponderterminate" title="Direct link to onresponderterminate"></a></h3>
289<p>The responder has been taken from the <code>View</code>. Might be taken by other views after a call to <code>onResponderTerminationRequest</code>, or might be taken by the OS without asking (e.g., happens with control center/ notification center on iOS)</p>
290<table><thead><tr><th>Type<tbody><tr><td><code>({nativeEvent: <a href=/docs/pressevent>PressEvent</a>}) => void</code></table>
291<hr>
292<h3 class="anchor anchorWithStickyNavbar_JmGV" id=onresponderterminationrequest><code>onResponderTerminationRequest</code><a href=#onresponderterminationrequest class=hash-link aria-label="Direct link to onresponderterminationrequest" title="Direct link to onresponderterminationrequest"></a></h3>
293<p>Some other <code>View</code> wants to become responder and is asking this <code>View</code> to release its responder. Returning <code>true</code> allows its release.</p>
294<table><thead><tr><th>Type<tbody><tr><td><code>({nativeEvent: <a href=/docs/pressevent>PressEvent</a>}) => void</code></table>
295<hr>
296<h3 class="anchor anchorWithStickyNavbar_JmGV" id=onstartshouldsetresponder><code>onStartShouldSetResponder</code><a href=#onstartshouldsetresponder class=hash-link aria-label="Direct link to onstartshouldsetresponder" title="Direct link to onstartshouldsetresponder"></a></h3>
297<p>Does this view want to become responder on the start of a touch?</p>
298<table><thead><tr><th>Type<tbody><tr><td><code>({nativeEvent: <a href=/docs/pressevent>PressEvent</a>}) => boolean</code></table>
299<hr>
300<h3 class="anchor anchorWithStickyNavbar_JmGV" id=onstartshouldsetrespondercapture><code>onStartShouldSetResponderCapture</code><a href=#onstartshouldsetrespondercapture class=hash-link aria-label="Direct link to onstartshouldsetrespondercapture" title="Direct link to onstartshouldsetrespondercapture"></a></h3>
301<p>If a parent <code>View</code> wants to prevent a child <code>View</code> from becoming responder on a touch start, it should have this handler which returns <code>true</code>.</p>
302<table><thead><tr><th>Type<tbody><tr><td><code>({nativeEvent: <a href=/docs/pressevent>PressEvent</a>}) => boolean</code></table>
303<hr>
304<h3 class="anchor anchorWithStickyNavbar_JmGV" id=pointerevents><code>pointerEvents</code><a href=#pointerevents class=hash-link aria-label="Direct link to pointerevents" title="Direct link to pointerevents"></a></h3>
305<p>Controls whether the <code>View</code> can be the target of touch events.</p>
306<ul>
307<li><code>'auto'</code>: The View can be the target of touch events.</li>
308<li><code>'none'</code>: The View is never the target of touch events.</li>
309<li><code>'box-none'</code>: The View is never the target of touch events but its subviews can be. It behaves like if the view had the following classes in CSS:</li>
310</ul>
311<div class="language-css codeBlockContainer_mQmQ theme-code-block" style=--prism-color:#FFFFFF;--prism-background-color:#282C34><div class=codeBlockTitle_kY6l>css</div><div class=codeBlockContent_t_Hd><pre tabindex=0 class="prism-code language-css codeBlock_RMoD thin-scrollbar" style=color:#FFFFFF;background-color:#282C34><code class=codeBlockLines_AclH><span class=token-line style=color:#FFFFFF><span class="token selector class" style=color:#2aa198>.box-none</span><span class="token plain"> </span><span class="token punctuation" style=color:#657b83>{</span><span class="token plain"></span><br></span><span class=token-line style=color:#FFFFFF><span class="token plain"> </span><span class="token property" style=color:#2aa198>pointer-events</span><span class="token punctuation" style=color:#657b83>:</span><span class="token plain"> none</span><span class="token punctuation" style=color:#657b83>;</span><span class="token plain"></span><br></span><span class=token-line style=color:#FFFFFF><span class="token plain"></span><span class="token punctuation" style=color:#657b83>}</span><span class="token plain"></span><br></span><span class=token-line style=color:#FFFFFF><span class="token plain"></span><span class="token selector class" style=color:#2aa198>.box-none</span><span class="token selector" style=color:#2aa198> *</span><span class="token plain"> </span><span class="token punctuation" style=color:#657b83>{</span><span class="token plain"></span><br></span><span class=token-line style=color:#FFFFFF><span class="token plain"> </span><span class="token property" style=color:#2aa198>pointer-events</span><span class="token punctuation" style=color:#657b83>:</span><span class="token plain"> auto</span><span class="token punctuation" style=color:#657b83>;</span><span class="token plain"></span><br></span><span class=token-line style=color:#FFFFFF><span class="token plain"></span><span class="token punctuation" style=color:#657b83>}</span><br></span></code></pre></div></div>
312<ul>
313<li><code>'box-only'</code>: The view can be the target of touch events but its subviews cannot be. It behaves like if the view had the following classes in CSS:</li>
314</ul>
315<div class="language-css codeBlockContainer_mQmQ theme-code-block" style=--prism-color:#FFFFFF;--prism-background-color:#282C34><div class=codeBlockTitle_kY6l>css</div><div class=codeBlockContent_t_Hd><pre tabindex=0 class="prism-code language-css codeBlock_RMoD thin-scrollbar" style=color:#FFFFFF;background-color:#282C34><code class=codeBlockLines_AclH><span class=token-line style=color:#FFFFFF><span class="token selector class" style=color:#2aa198>.box-only</span><span class="token plain"> </span><span class="token punctuation" style=color:#657b83>{</span><span class="token plain"></span><br></span><span class=token-line style=color:#FFFFFF><span class="token plain"> </span><span class="token property" style=color:#2aa198>pointer-events</span><span class="token punctuation" style=color:#657b83>:</span><span class="token plain"> auto</span><span class="token punctuation" style=color:#657b83>;</span><span class="token plain"></span><br></span><span class=token-line style=color:#FFFFFF><span class="token plain"></span><span class="token punctuation" style=color:#657b83>}</span><span class="token plain"></span><br></span><span class=token-line style=color:#FFFFFF><span class="token plain"></span><span class="token selector class" style=color:#2aa198>.box-only</span><span class="token selector" style=color:#2aa198> *</span><span class="token plain"> </span><span class="token punctuation" style=color:#657b83>{</span><span class="token plain"></span><br></span><span class=token-line style=color:#FFFFFF><span class="token plain"> </span><span class="token property" style=color:#2aa198>pointer-events</span><span class="token punctuation" style=color:#657b83>:</span><span class="token plain"> none</span><span class="token punctuation" style=color:#657b83>;</span><span class="token plain"></span><br></span><span class=token-line style=color:#FFFFFF><span class="token plain"></span><span class="token punctuation" style=color:#657b83>}</span><br></span></code></pre></div></div>
316<table><thead><tr><th>Type<tbody><tr><td>enum('box-none', 'none', 'box-only', 'auto')</table>
317<hr>
318<h3 class="anchor anchorWithStickyNavbar_JmGV" id=removeclippedsubviews><code>removeClippedSubviews</code><a href=#removeclippedsubviews class=hash-link aria-label="Direct link to removeclippedsubviews" title="Direct link to removeclippedsubviews"></a></h3>
319<p>This is a reserved performance property exposed by <code>RCTView</code> 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 <code>overflow: hidden</code>, as should the containing view (or one of its superviews).</p>
320<table><thead><tr><th>Type<tbody><tr><td>bool</table>
321<hr>
322<h3 class="anchor anchorWithStickyNavbar_JmGV" id=rendertohardwaretextureandroid-android><code>renderToHardwareTextureAndroid</code> <div class="label android">Android</div><a href=#rendertohardwaretextureandroid-android class=hash-link aria-label="Direct link to rendertohardwaretextureandroid-android" title="Direct link to rendertohardwaretextureandroid-android"></a></h3>
323<p>Whether this <code>View</code> should render itself (and all of its children) into a single hardware texture on the GPU.</p>
324<p>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 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.</p>
325<table><thead><tr><th>Type<tbody><tr><td>bool</table>
326<hr>
327<h3 class="anchor anchorWithStickyNavbar_JmGV" id=role><code>role</code><a href=#role class=hash-link aria-label="Direct link to role" title="Direct link to role"></a></h3>
328<p><code>role</code> communicates the purpose of a component to the user of an assistive technology. Has precedence over the <a href=/docs/view#accessibilityrole><code>accessibilityRole</code></a> prop.</p>
329<table><thead><tr><th>Type<tbody><tr><td><a href=/docs/accessibility#role>Role</a></table>
330<hr>
331<h3 class="anchor anchorWithStickyNavbar_JmGV" id=shouldrasterizeios-ios><code>shouldRasterizeIOS</code> <div class="label ios">iOS</div><a href=#shouldrasterizeios-ios class=hash-link aria-label="Direct link to shouldrasterizeios-ios" title="Direct link to shouldrasterizeios-ios"></a></h3>
332<p>Whether this <code>View</code> should be rendered as a bitmap before compositing.</p>
333<p>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.</p>
334<p>Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. Test and measure when using this property.</p>
335<table><thead><tr><th>Type<tbody><tr><td>bool</table>
336<hr>
337<h3 class="anchor anchorWithStickyNavbar_JmGV" id=style><code>style</code><a href=#style class=hash-link aria-label="Direct link to style" title="Direct link to style"></a></h3>
338<table><thead><tr><th>Type<tbody><tr><td><a href=/docs/view-style-props>View Style</a></table>
339<hr>
340<h3 class="anchor anchorWithStickyNavbar_JmGV" id=tabindex-android><code>tabIndex</code> <div class="label android">Android</div><a href=#tabindex-android class=hash-link aria-label="Direct link to tabindex-android" title="Direct link to tabindex-android"></a></h3>
341<p>Whether this <code>View</code> should be focusable with a non-touch input device, eg. receive focus with a hardware keyboard.
342Supports the following values:</p>
343<ul>
344<li><code>0</code> - View is focusable</li>
345<li><code>-1</code> - View is not focusable</li>
346</ul>
347<table><thead><tr><th>Type<tbody><tr><td>enum(0, -1)</table>
348<hr>
349<h3 class="anchor anchorWithStickyNavbar_JmGV" id=testid><code>testID</code><a href=#testid class=hash-link aria-label="Direct link to testid" title="Direct link to testid"></a></h3>
350<p>Used to locate this view in end-to-end tests.</p>
351<blockquote>
352<p>This disables the 'layout-only view removal' optimization for this view!</p>
353</blockquote>
354<table><thead><tr><th>Type<tbody><tr><td>string</table></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class=editButtons_t0bR><a href=https://github.com/facebook/react-native-website/edit/main/docs/view.md target=_blank rel="noopener noreferrer" class=theme-edit-this-page><svg fill=currentColor height=20 width=20 viewBox="0 0 40 40" class=iconEdit_bHB7 aria-hidden=true><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"/></g></svg>Edit page for next release</a><a href=https://github.com/facebook/react-native-website/edit/main/website/versioned_docs/version-0.79/view.md target=_blank rel="noopener noreferrer" class=theme-edit-this-page><svg fill=currentColor height=20 width=20 viewBox="0 0 40 40" class=iconEdit_bHB7 aria-hidden=true><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"/></g></svg>Edit page for current release</a></div><div class=lastUpdated_VsjB><span class=theme-last-updated>Last updated<!-- --> on <b><time datetime=2025-04-14T14:14:17.000Z itemprop=dateModified>Apr 14, 2025</time></b></span></div></div></footer></article><nav class="docusaurus-mt-lg pagination-nav" aria-label="Docs pages"><a class="pagination-nav__link pagination-nav__link--prev" href=/docs/touchablewithoutfeedback><div class=pagination-nav__sublabel>Previous</div><div class=pagination-nav__label>TouchableWithoutFeedback</div></a><a class="pagination-nav__link pagination-nav__link--next" href=/docs/virtualizedlist><div class=pagination-nav__sublabel>Next</div><div class=pagination-nav__label>VirtualizedList</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_XG6w thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href=#synthetic-touch-events class="table-of-contents__link toc-highlight">Synthetic Touch Events</a><li><a href=#props class="table-of-contents__link toc-highlight">Props</a><ul><li><a href=#accessibilityactions class="table-of-contents__link toc-highlight"><code>accessibilityActions</code></a><li><a href=#accessibilityelementshidden-ios class="table-of-contents__link toc-highlight"><code>accessibilityElementsHidden</code> <div class="label ios">iOS</div></a><li><a href=#accessibilityhint class="table-of-contents__link toc-highlight"><code>accessibilityHint</code></a><li><a href=#accessibilitylanguage-ios class="table-of-contents__link toc-highlight"><code>accessibilityLanguage</code> <div class="label ios">iOS</div></a><li><a href=#accessibilityignoresinvertcolors-ios class="table-of-contents__link toc-highlight"><code>accessibilityIgnoresInvertColors</code> <div class="label ios">iOS</div></a><li><a href=#accessibilitylabel class="table-of-contents__link toc-highlight"><code>accessibilityLabel</code></a><li><a href=#accessibilityliveregion-android class="table-of-contents__link toc-highlight"><code>accessibilityLiveRegion</code> <div class="label android">Android</div></a><li><a href=#accessibilityrole class="table-of-contents__link toc-highlight"><code>accessibilityRole</code></a><li><a href=#accessibilitystate class="table-of-contents__link toc-highlight"><code>accessibilityState</code></a><li><a href=#accessibilityvalue class="table-of-contents__link toc-highlight"><code>accessibilityValue</code></a><li><a href=#accessibilityviewismodal-ios class="table-of-contents__link toc-highlight"><code>accessibilityViewIsModal</code> <div class="label ios">iOS</div></a><li><a href=#accessible class="table-of-contents__link toc-highlight"><code>accessible</code></a><li><a href=#aria-busy class="table-of-contents__link toc-highlight"><code>aria-busy</code></a><li><a href=#aria-checked class="table-of-contents__link toc-highlight"><code>aria-checked</code></a><li><a href=#aria-disabled class="table-of-contents__link toc-highlight"><code>aria-disabled</code></a><li><a href=#aria-expanded class="table-of-contents__link toc-highlight"><code>aria-expanded</code></a><li><a href=#aria-hidden class="table-of-contents__link toc-highlight"><code>aria-hidden</code></a><li><a href=#aria-label class="table-of-contents__link toc-highlight"><code>aria-label</code></a><li><a href=#aria-labelledby-android class="table-of-contents__link toc-highlight"><code>aria-labelledby</code> <div class="label android">Android</div></a><li><a href=#aria-live-android class="table-of-contents__link toc-highlight"><code>aria-live</code> <div class="label android">Android</div></a><li><a href=#aria-modal-ios class="table-of-contents__link toc-highlight"><code>aria-modal</code> <div class="label ios">iOS</div></a><li><a href=#aria-selected class="table-of-contents__link toc-highlight"><code>aria-selected</code></a><li><a href=#aria-valuemax class="table-of-contents__link toc-highlight"><code>aria-valuemax</code></a><li><a href=#aria-valuemin class="table-of-contents__link toc-highlight"><code>aria-valuemin</code></a><li><a href=#aria-valuenow class="table-of-contents__link toc-highlight"><code>aria-valuenow</code></a><li><a href=#aria-valuetext class="table-of-contents__link toc-highlight"><code>aria-valuetext</code></a><li><a href=#collapsable class="table-of-contents__link toc-highlight"><code>collapsable</code></a><li><a href=#collapsablechildren class="table-of-contents__link toc-highlight"><code>collapsableChildren</code></a><li><a href=#focusable-android class="table-of-contents__link toc-highlight"><code>focusable</code> <div class="label android">Android</div></a><li><a href=#hitslop class="table-of-contents__link toc-highlight"><code>hitSlop</code></a><li><a href=#id class="table-of-contents__link toc-highlight"><code>id</code></a><li><a href=#importantforaccessibility-android class="table-of-contents__link toc-highlight"><code>importantForAccessibility</code> <div class="label android">Android</div></a><li><a href=#nativeid class="table-of-contents__link toc-highlight"><code>nativeID</code></a><li><a href=#needsoffscreenalphacompositing class="table-of-contents__link toc-highlight"><code>needsOffscreenAlphaCompositing</code></a><li><a href=#nextfocusdown-android class="table-of-contents__link toc-highlight"><code>nextFocusDown</code> <div class="label android">Android</div></a><li><a href=#nextfocusforward-android class="table-of-contents__link toc-highlight"><code>nextFocusForward</code> <div class="label android">Android</div></a><li><a href=#nextfocusleft-android class="table-of-contents__link toc-highlight"><code>nextFocusLeft</code> <div class="label android">Android</div></a><li><a href=#nextfocusright-android class="table-of-contents__link toc-highlight"><code>nextFocusRight</code> <div class="label android">Android</div></a><li><a href=#nextfocusup-android class="table-of-contents__link toc-highlight"><code>nextFocusUp</code> <div class="label android">Android</div></a><li><a href=#onaccessibilityaction class="table-of-contents__link toc-highlight"><code>onAccessibilityAction</code></a><li><a href=#onaccessibilityescape-ios class="table-of-contents__link toc-highlight"><code>onAccessibilityEscape</code> <div class="label ios">iOS</div></a><li><a href=#onaccessibilitytap-ios class="table-of-contents__link toc-highlight"><code>onAccessibilityTap</code> <div class="label ios">iOS</div></a><li><a href=#onlayout class="table-of-contents__link toc-highlight"><code>onLayout</code></a><li><a href=#onmagictap-ios class="table-of-contents__link toc-highlight"><code>onMagicTap</code> <div class="label ios">iOS</div></a><li><a href=#onmoveshouldsetresponder class="table-of-contents__link toc-highlight"><code>onMoveShouldSetResponder</code></a><li><a href=#onmoveshouldsetrespondercapture class="table-of-contents__link toc-highlight"><code>onMoveShouldSetResponderCapture</code></a><li><a href=#onrespondergrant class="table-of-contents__link toc-highlight"><code>onResponderGrant</code></a><li><a href=#onrespondermove class="table-of-contents__link toc-highlight"><code>onResponderMove</code></a><li><a href=#onresponderreject class="table-of-contents__link toc-highlight"><code>onResponderReject</code></a><li><a href=#onresponderrelease class="table-of-contents__link toc-highlight"><code>onResponderRelease</code></a><li><a href=#onresponderterminate class="table-of-contents__link toc-highlight"><code>onResponderTerminate</code></a><li><a href=#onresponderterminationrequest class="table-of-contents__link toc-highlight"><code>onResponderTerminationRequest</code></a><li><a href=#onstartshouldsetresponder class="table-of-contents__link toc-highlight"><code>onStartShouldSetResponder</code></a><li><a href=#onstartshouldsetrespondercapture class="table-of-contents__link toc-highlight"><code>onStartShouldSetResponderCapture</code></a><li><a href=#pointerevents class="table-of-contents__link toc-highlight"><code>pointerEvents</code></a><li><a href=#removeclippedsubviews class="table-of-contents__link toc-highlight"><code>removeClippedSubviews</code></a><li><a href=#rendertohardwaretextureandroid-android class="table-of-contents__link toc-highlight"><code>renderToHardwareTextureAndroid</code> <div class="label android">Android</div></a><li><a href=#role class="table-of-contents__link toc-highlight"><code>role</code></a><li><a href=#shouldrasterizeios-ios class="table-of-contents__link toc-highlight"><code>shouldRasterizeIOS</code> <div class="label ios">iOS</div></a><li><a href=#style class="table-of-contents__link toc-highlight"><code>style</code></a><li><a href=#tabindex-android class="table-of-contents__link toc-highlight"><code>tabIndex</code> <div class="label android">Android</div></a><li><a href=#testid class="table-of-contents__link toc-highlight"><code>testID</code></a></ul></ul></div></div></div></div></main></div></div></div><footer class="theme-layout-footer footer footer--dark"><div class="container container-fluid"><div class="row footer__links"><div class="theme-layout-footer-column col footer__col"><div class=footer__title>Develop</div><ul class="footer__items clean-list"><li class=footer__item><a class=footer__link-item href=/docs/getting-started>Guides</a><li class=footer__item><a class=footer__link-item href=/docs/components-and-apis>Components</a><li class=footer__item><a class=footer__link-item href=/docs/accessibilityinfo>APIs</a><li class=footer__item><a class=footer__link-item href=/architecture/overview>Architecture</a></ul></div><div class="theme-layout-footer-column col footer__col"><div class=footer__title>Participate</div><ul class="footer__items clean-list"><li class=footer__item><a class=footer__link-item href=/showcase>Showcase</a><li class=footer__item><a class=footer__link-item href=/contributing/overview>Contributing</a><li class=footer__item><a class=footer__link-item href=/community/overview>Community</a><li class=footer__item><a href=https://reactnative.directory/ target=_blank rel="noopener noreferrer" class=footer__link-item>Directory<svg width=13.5 height=13.5 aria-hidden=true viewBox="0 0 24 24" class=iconExternalLink_2l9O><path fill=currentColor d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"/></svg></a><li class=footer__item><a href=https://stackoverflow.com/questions/tagged/react-native target=_blank rel="noopener noreferrer" class=footer__link-item>Stack Overflow<svg width=13.5 height=13.5 aria-hidden=true viewBox="0 0 24 24" class=iconExternalLink_2l9O><path fill=currentColor d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"/></svg></a></ul></div><div class="theme-layout-footer-column col footer__col"><div class=footer__title>Find us</div><ul class="footer__items clean-list"><li class=footer__item><a class=footer__link-item href=/blog>Blog</a><li class=footer__item><a href=https://x.com/reactnative target=_blank rel="noopener noreferrer" class=footer__link-item>X<svg width=13.5 height=13.5 aria-hidden=true viewBox="0 0 24 24" class=iconExternalLink_2l9O><path fill=currentColor d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"/></svg></a><li class=footer__item><a href=https://bsky.app/profile/reactnative.dev target=_blank rel="noopener noreferrer" class=footer__link-item>Bluesky<svg width=13.5 height=13.5 aria-hidden=true viewBox="0 0 24 24" class=iconExternalLink_2l9O><path fill=currentColor d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"/></svg></a><li class=footer__item><a href=https://github.com/facebook/react-native target=_blank rel="noopener noreferrer" class=footer__link-item>GitHub<svg width=13.5 height=13.5 aria-hidden=true viewBox="0 0 24 24" class=iconExternalLink_2l9O><path fill=currentColor d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"/></svg></a></ul></div><div class="theme-layout-footer-column col footer__col"><div class=footer__title>Explore More</div><ul class="footer__items clean-list"><li class=footer__item><a href=https://react.dev/ target=_blank rel="noopener noreferrer" class=footer__link-item>ReactJS<svg width=13.5 height=13.5 aria-hidden=true viewBox="0 0 24 24" class=iconExternalLink_2l9O><path fill=currentColor d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"/></svg></a><li class=footer__item><a href=https://opensource.fb.com/legal/privacy/ target=_blank rel="noopener noreferrer" class=footer__link-item>Privacy Policy<svg width=13.5 height=13.5 aria-hidden=true viewBox="0 0 24 24" class=iconExternalLink_2l9O><path fill=currentColor d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"/></svg></a><li class=footer__item><a href=https://opensource.fb.com/legal/terms/ target=_blank rel="noopener noreferrer" class=footer__link-item>Terms of Service<svg width=13.5 height=13.5 aria-hidden=true viewBox="0 0 24 24" class=iconExternalLink_2l9O><path fill=currentColor d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"/></svg></a></ul></div></div><div class="footer__bottom text--center"><div class=margin-bottom--sm><a href=https://opensource.fb.com/ rel="noopener noreferrer" class=footerLogoLink_tutC><img src=/img/oss_logo.svg alt="Meta Open Source Logo" class="footer__logo themedComponent_siVc themedComponent--light_hHel"><img src=/img/oss_logo.svg alt="Meta Open Source Logo" class="footer__logo themedComponent_siVc themedComponent--dark_yETr"></a></div><div class=footer__copyright>Copyright © 2025 Meta Platforms, Inc.</div></div></div></footer></div>