KeyboardAvoidingView
A container that moves or shrinks its content when the on-screen keyboard opens, so inputs and buttons stay visible. Use behavior="padding" on iOS, pass keyboardVerticalOffset for any header above it, and pair it with a ScrollView using keyboardShouldPersistTaps="handled".
Minimal example
<KeyboardAvoidingView style={{ flex: 1 }} behavior={Platform.OS === "ios" ? "padding" : "height"}>
<ScrollView keyboardShouldPersistTaps="handled">{form}</ScrollView>
</KeyboardAvoidingView>Learn this concept
Lesson 4.1 · React Native screen layoutUsed in exercises
Exercise 4.7 · API client and auth screensPrerequisite conceptsCore components
RelatedSafe area