Keyboard Avoiding View
A View that adjusts itself to remain visible when the keyboard is open
This component will automatically adjust its height, position, or bottom padding based on the keyboard height to remain visible while the virtual keyboard is displayed.
How to use
- Select the Keyboard Avoiding View component from the Components drawer. You can open the list of components by clicking the
+
button next to Components. - Add any components that you want to avoid being hidden by the virtual keyboard inside the Keyboard Avoiding View.
For example, a Login screen has two Text Input components and a Button. We want to make sure when one of the inputs are focused by the user that they aren't covered by the keyboard so we can wrap them inside the Keyboard Avoiding View in the Components tree.
Here is an example of it working on iOS.
Style Properties
Style properties allow you to customize the look and feel of the component. Combinations of styles applied to components can be saved as Stylesheets to easily reuse styles throughout your app. Styles can also be set dynamically using Variables. To learn more about all the different styling properties and how they work, take a look at Intro to Styling.
Configuration Properties
Basic
Property | Description |
---|---|
Component Name | To alter the name of the component. The name is reflected in the Components tree. Defaults to Keyboard Avoiding View |
Enable | Enable the keyboard Avoiding View. By default, it is enabled. |
Resizing Behavior | The behavior for how the keyboard resizing interacts with the rest of the screen. |
Keyboard Vertical Offset | Set the distance between the top of the keyboard and the bottom of the screen's contents. |
Device-specific behaviour
Android and iOS both interact with the Resizing Behavior property differently. It's recommended to set these independently for each platform using the platform-specific properties.
iOS Specific
These props will be used on iOS devices if set, otherwise the properties set in the Basic section will be used.
Property | Description |
---|---|
Resizing Behavior | The behavior for how the keyboard resizing interacts with the rest of the screen. Padding is recommended |
Keyboard Vertical Offset | Adjust the distance between the top of the user screen and the react native view. |
Android Specific
These props will be used on Android devices if set, otherwise the properties set in the Basic section will be used.
Property | Description |
---|---|
Resizing Behavior | The behavior for how the keyboard resizing interacts with the rest of the screen. Height is recommended |
Keyboard Vertical Offset | Adjust the distance between the top of the user screen and the react native view. |
Data Properties
Conditional Display
You can conditionally display a component based on a given condition. Learn more about conditionally displaying components in the Conditional Display doc.
Updated 2 months ago