Skip to content

Keyboard Avoiding

KeyboardAvoiding prevents the software keyboard from obscuring text input fields.

Usage

FormScreen.tsx
import { KeyboardAvoiding, Input, Button } from '@masumdev/rn-ui';
export function FormScreen() {
return (
<KeyboardAvoiding scroll bg="background">
<Input placeholder="Enter your email" />
<Button tone="primary">Submit</Button>
</KeyboardAvoiding>
);
}

Props API

PropTypeDefaultDescription
childrenReactNodeForm elements wrapped by the container.
scrollbooleantrueWraps content in a ScrollView.
bgThemeColorNameBackground color token.