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 it's a UIView, <div>, android.view, etc.

A View is designed to be nested inside other views and can have zero to many children of any type.

Adding a View component

  • Select the View component from the Components drawer. You can open the list of components by clicking the + button next to Components.

The example below creates a View with a background color, fixed width, and height. It also wraps another View with a different background color, width, and height.

1425

📘

To customize styles of a View component, check the Styles documentation.

Basic Configuration Properties

PropertyDescription
Component NameTo alter the name of the component. The name is reflected in the Components tree. Defaults to View.

Advanced Configuration Properties

PropertyDescription
collapsableEnable to automatically remove the View from the native hierarchy if it's unneeded in order to optimize performance.
hitSlopDefines how far away a touch event will be registered from the View.
pointerEventsDetermines if a View can handle touch events.
removeClippedSubviewsUsed for scrolling content that contains offscreen subviews (subviews must have overflow set to hidden).
needsOffscreenAlphaCompositingDetermine if the View should be rendered offscreen and composited with alpha in order to preserve original colors and blending behaviour.
renderToHardwareTextureAndroidDetermine if the View and its children should be rendered into one hardware texture on the GPU.
shouldRasterizeIOSEnable to render the View as a bitmap before compositing.

Accessibility Configuration Properties

You can apply the following accessibility configurations on a View component:

PropertyDescription
accessibilityLiveRegionDetermine how accessibility services should inform the user of any changes made to the View.
importantForAccessibilityDetermines the View's importance for accessibility and also how accessibility events work.
accessibleWhen enabled, the element will be defined as accessible (defaults to false).
accessibilityLabelText in this input will override what the user's screen reader would read by default.
accessibilityHintAdditional explanation of what happens when a user interacts with an accessibility element.
accessibilityElementsHiddenEnable to hide accessibility elements within the View (defaults to false).
accessibilityRoleDefines the role of the element for the user's screen reader.
accessibilityIgnoresInvertColorsEnable to prevent the color of the View from being inverted if color inversion is turned on.