원클릭으로
react-native-keyboard-handling
Mandatory rules and components for handling keyboard avoidance smoothly in the React Native app.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Mandatory rules and components for handling keyboard avoidance smoothly in the React Native app.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
How to correctly handle and format protobuf Timestamp dates sent by the API Gateway to prevent "Invalid Date" issues.
Senior-level React Native architecture and patterns for Expo 54 apps.
Strict coding standards, naming conventions, file size limits, and typing rules.
Guidelines for managing server state, queries, and API clients in React Native.
Best practices for implementing forms with React Hook Form and Zod.
Mandatory rule to never use deprecated APIs or ignore deprecation warnings.
| name | React Native Keyboard Handling |
| description | Mandatory rules and components for handling keyboard avoidance smoothly in the React Native app. |
This skill outlines the standard way to handle the software keyboard avoiding behavior in the nativapp codebase.
[!WARNING] Do NOT use React Native's built-in
<KeyboardAvoidingView>oruseAnimatedKeyboardfrom reanimated. It is prone to cross-platform bugs, jitter, and double-padding on Android whenadjustResizeis active.
We use react-native-keyboard-controller, which uses C++ native modules to perfectly synchronize the UI with the keyboard frames at 60/120fps and natively handles auto-scrolling to focused inputs.
The app is already wrapped in <KeyboardProvider> in _layout.tsx.
We have created three global tools to standardize this:
useAppKeyboard() HookPath: src/shared/hooks/use-app-keyboard.ts
Use this hook if you need the raw keyboard height for a custom animation. Note that the height is usually NEGATIVE.
import { useAppKeyboard } from '@/shared/hooks/use-app-keyboard';
import Animated, { useAnimatedStyle } from 'react-native-reanimated';
const keyboard = useAppKeyboard();
const style = useAnimatedStyle(() => ({
transform: [{ translateY: keyboard.height.value }],
}));
<AppKeyboardScrollView>Path: src/components/layout/AppKeyboardScrollView.tsx
Use this component as a drop-in replacement for any ScrollView that contains inputs (e.g. large forms, Auth screens).
It automatically adds padding and auto-scrolls to the focused input magically.
import { AppKeyboardScrollView } from '@/components/layout/AppKeyboardScrollView';
// Usage
<AppKeyboardScrollView bottomOffset={20}>
<TextInput placeholder="Email" />
<TextInput placeholder="Password" />
</AppKeyboardScrollView>;
<AppKeyboardAvoidingView>Path: src/components/layout/AppKeyboardAvoidingView.tsx
Use this component as a drop-in replacement for standard <View> containers when you don't need a ScrollView but still need to avoid the keyboard (e.g., Centered Modals, Absolute positioned bottom buttons).
import { AppKeyboardAvoidingView } from '@/components/layout/AppKeyboardAvoidingView';
// Usage inside a Modal or full screen view
<AppKeyboardAvoidingView style={styles.overlay} bottomOffset={80}>
<View style={styles.centeredModalContent}>
<TextInput placeholder="Titre" />
</View>
</AppKeyboardAvoidingView>;
AdminModal), place the <AppKeyboardAvoidingView> directly inside the <Modal> as the outermost wrapper (flex: 1). This ensures the centered content inside it gets naturally pushed upward.bottomOffset (usually between 20 and 80) to ensure there is a comfortable breathing room between the keyboard and the input/button.