Skip to main content
Version: 7.0.x

onSoftInputShown

Use onSoftInputShown method, if you want to listen to events when soft input is shown.

Parameters

TypeRequiredDescription
({ softInputHeight }: { softInputHeight: number }) => voidyesfunction called with current soft input height when soft input is displayed

Example

import { AvoidSoftInput } from "react-native-avoid-softinput";

const unsubscribe = AvoidSoftInput.onSoftInputShown(({ softInputHeight }) => {
// Do sth
});

// later invoke unsubscribe.remove()