• Stars
    star
    954
  • Rank 47,914 (Top 1.0 %)
  • Language
    Objective-C
  • License
    MIT License
  • Created over 7 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

⚛ Library to prevent issues of keyboard sliding up and cover inputs on React-Native iOS projects.

React-Native Keyboard Manager

License MIT npm version npm downloads

Library to prevent issues of keyboard sliding up and cover inputs on React-Native iOS projects . Thanks to awesome IQKeyboardManager ❤️.

This is only for iOS, Android no needed. For Android just add android:windowSoftInputMode="adjustResize" to your activity.

Screenshots

Enabled Disabled
Credits: IQKeyboardManager

NOTES:

Install

yarn add react-native-keyboard-manager

Or

npm i -S react-native-keyboard-manager

Auto linking

If you are using React Native 0.60.+ go to the folder your-project/ios and run pod install, and you're done.

If not, use one of the following methods to link.

Link with react-native link:

React native link is no longer supported due to cocoapods dependency. To avoid cocoapods you can use the version 4.0.13-X.

Link manual with cocoapods:

  1. Add this line to your Podfile

    pod 'ReactNativeKeyboardManager', :path => '../node_modules/react-native-keyboard-manager'
  2. run

    pod install

Post install

Because IQKeyboardManager is written in Swift, you need to enable Swift on your native Xcode project.

  1. Open ios/YourAppName.xcworkspace in Xcode
  2. Right-click on YourAppName in the Project Navigator on the left, and click New File.
  3. Create a single empty Swift file to the project (make sure that YourAppName target is selected when adding)
  4. When Xcode asks, press Create Bridging Header and do not remove Swift file then.
  5. Re-run your build.

Usage

It does not need any extra library setup to work, just install and go.

But, if you need some configuration, there are some options available.

import { Platform } from 'react-native';
import KeyboardManager from 'react-native-keyboard-manager';

if (Platform.OS === 'ios') {
    KeyboardManager.setEnable(true);
    KeyboardManager.setEnableDebugging(false);
    KeyboardManager.setKeyboardDistanceFromTextField(10);
    KeyboardManager.setLayoutIfNeededOnUpdate(true);
    KeyboardManager.setEnableAutoToolbar(true);
    KeyboardManager.setToolbarDoneBarButtonItemText("Done");
    KeyboardManager.setToolbarManageBehaviourBy("subviews"); // "subviews" | "tag" | "position"
    KeyboardManager.setToolbarPreviousNextButtonEnable(false);
    KeyboardManager.setToolbarTintColor('#0000FF'); // Only #000000 format is supported
    KeyboardManager.setToolbarBarTintColor('#FFFFFF'); // Only #000000 format is supported
    KeyboardManager.setShouldShowToolbarPlaceholder(true);
    KeyboardManager.setOverrideKeyboardAppearance(false);
    KeyboardManager.setKeyboardAppearance("default"); // "default" | "light" | "dark"
    KeyboardManager.setShouldResignOnTouchOutside(true);
    KeyboardManager.setShouldPlayInputClicks(true);
    KeyboardManager.resignFirstResponder();
    KeyboardManager.isKeyboardShowing()
      .then((isShowing) => {
          // ...
      });
}

For more details, see the Sample Project and the official IQKeyboardManager documentation.

Enable Next/Previous buttons

If you want to use Next/Previous buttons, enable it.

if (Platform.OS === 'ios') {
    KeyboardManager.setToolbarPreviousNextButtonEnable(true);
}

And if you want to use Next/Previous buttons inside a Modal, you need to wrap the fields in a PreviousNextView.

import { PreviousNextView } from 'react-native-keyboard-manager';

class App extends Component {
  render() {
      return (
          <View {...} >
              // others views
              <Modal {...} >
                  // others views
                  <PreviousNextView style={...} >
                      // all TextInput
                  </PreviousNextView>
              </Modal>
          </View>
      );
  }
}

Known issues

  • If your project is managed by Expo, you will need to eject.
  • Problem with "@react-navigation/native-stack" and "IQKeyboardManager" on iOS: #89
  • Pod install failed on M1 machines: #104

Contribute

New features, bug fixes and improvements are welcome! For questions and suggestions use the issues.

Become a Patron! Donate

Star History

Star History Chart

License

The MIT License (MIT)

Copyright (c) 2017 Douglas Nassif Roma Junior

See the full license file.

IQKeyboardManager License

The MIT License (MIT)

Copyright (c) 2013-16 Iftekhar Qurashi

See the full IQKeyboardManager license file.

More Repositories

1

android-simple-tooltip

A simple library based on PopupWindow to create Tooltips on Android. 💚
Java
791
star
2

react-native-simple-dialogs

⚛ Cross-platform React Native dialogs based on the Modal component
TypeScript
323
star
3

AndroidBluetoothLibrary

A Library for easy implementation of Serial Bluetooth Classic and Low Energy on Android. 💙
Java
212
star
4

react-native-get-location

⚛ Simple to use React Native library to get native device location for Android and iOS.
Java
205
star
5

react-native-recaptcha-that-works

⚛ A reCAPTCHA bridge for React Native that works (Android and iOS)
TypeScript
164
star
6

react-native-pdf-renderer

⚛ A zoomable, blazing fast, zero dependencies, pure native, typed PDF Renderer for Android and iOS.
Java
132
star
7

emage

🧙‍♂️ From developers to developers: a cross-platform tool for losslessly image compression.
JavaScript
120
star
8

react-native-easybluetooth-classic

⚛ A Library for easy implementation of Serial Bluetooth Classic on React Native (Android Only).
Java
43
star
9

react-native-gradient-shimmer

⚛ A pure JavaScript, performant, typed shimmer component for Android, iOS and Web
TypeScript
41
star
10

react-native-applifecycle

⚛ Enhances the reliability of managing app lifecycles across iOS and Android platforms, ensuring consistent behavior regarding foreground and background states.
TypeScript
39
star
11

electron-webpack-react-boilerplate

Sample project containing Electron Forge + webpack + React + React Router + Ant Design + Recharts + Sass and Less.
JavaScript
26
star
12

react-native-notifree

*DEPRECATED* Free React Native library to display local notifications.
JavaScript
22
star
13

react-native-easybluetooth-le

A Library for easy implementation of Serial Bluetooth Low Energy on React Native. ⚛
Java
18
star
14

react-recaptcha-that-works

⚛ A reCAPTCHA bridge for React that works.
TypeScript
16
star
15

DouglasJuniorTCC

Software para mineração e medição de dados do GitHub.
Java
10
star
16

LaTeX-PPGI-UTFPR

Template LaTeX para criação do PDM/Dissertação de acordo com as normas da UTFPR
TeX
10
star
17

Facebug

Rede social em desenvolvimento pelos alunos de Programação Web 2015/1 do curso de ADS da Faculdade Integrado
Java
9
star
18

Bootcamp-DB1-2024

JavaScript
8
star
19

learning-react

JavaScript
7
star
20

WebDevAlfa-2018-React

Desenvolvimento Web com React JS
JavaScript
7
star
21

WebDevAlfa-2017-2-PrimeiroProjeto

Projeto "Hello World" utilizado como introdução ao framework React Native na Pós-graduação WebDev Alfa.
JavaScript
6
star
22

Treinamento-JavaScript-UTFPR

Conteúdo do treinamento de JavaScript ministrado na UTFPR-CM.
JavaScript
6
star
23

RhinoAndroidTest

JavaScript interpretation with Rhino
Java
5
star
24

simple-csv-editor

Simples editor de CSV para auxiliar no setup de máquinas pick and place.
Java
4
star
25

react-native-inputAccessoryView

Project to simulate the inputAccessoryView problem
Objective-C
4
star
26

programacao-web-2018-2

Repositório para os arquivos das aulas de Programação Web.
Java
4
star
27

conccepar-caprover-workshop

Minicurso: Como instalar e configurar um PaaS em minutos!
4
star
28

ignore-dependency-scripts

Script to prevent dependencies to execute post/pre install scripts when installed directly from git.
JavaScript
4
star
29

WebDevAlfa-2017-2-Avaliacao

Avaliação da disciplina de Desenvolvimento de Aplicações Híbridas.
Objective-C
4
star
30

WebDevAlfa-2019-Node

Desenvolvimento de APIs com Node JS
JavaScript
4
star
31

SampleLibGDX

Sample project for learn libGDX on Android Studio
Java
4
star
32

ohm-to-hass-agent

PowerShell scripts to read sensors from Open Hardware Monitor and return to HASS.Agent.
PowerShell
4
star
33

JavaBlockProgramming

A prototype for control the "execution flow" of the block programming.
Java
3
star
34

java-basic-http_PI4_2016-2

Atividade de implementação de um Servidor HTTP Java para Projeto Integrador IV (2016/2)
Java
3
star
35

meiodia

🕺🍻 Chaaaaaaaama!
JavaScript
3
star
36

TestSwiftRealmAlamofireObjectMapper

Testing Realm Database on iOS Swift project
Swift
3
star
37

nodejs-babel-vscode-debug

Example project to use NodeJS 6 with babel and vscode debug.
JavaScript
3
star
38

WebDevAlfa-2018-Node

Desenvolvimento de APIs com Node JS
JavaScript
3
star
39

CloudTester

Biblioteca de teste e comparação entre APIs de acesso a nuvem.
Java
3
star
40

Treinamento-JavaScript-Mactus

Material do treinamento de JavaScript para a empresa Mactus de Campo Mourão
JavaScript
3
star
41

php-legacy-code-example

CSS
3
star
42

WebDevAlfa-2019-React

Desenvolvimento Web com React JS
JavaScript
3
star
43

MinicursoLibGDX-SNCT2016

Projetos utilizados durante o Minicurso sobre LibGDX do SNCT 2016 em Dois Vizinhos - PR http://semanact.mcti.gov.br/
Java
3
star
44

fabric-icons

This repository is maintained to allow the import of Office Fabric Icons into the react-native-vector-icons
SCSS
3
star
45

SEINFO-2017-JavaScript

Projeto do minicurso de Desenvolvimento Full-stack com JavaScript da SEINFO 2017
JavaScript
3
star
46

Treinamento-JavaScript-SkyPass

Material do treinamento de desenvolvimento Web e Mobile para a empresa SkyPass de Campo Mourão
3
star
47

MinicursoLibGDX-VIICONCCEPAR2016

Projetos utilizados durante o Minicurso sobre LibGDX do VII CONCCEPAR da Faculdade Integrado de Campo Mourão - PR http://conccepar.grupointegrado.br/
Java
3
star
48

react-native-easybluetooth-core

This repository has the CoreModule class used in the libraries react-native-easybluetooth-le and react-native-easybluetooth-classic
Java
3
star
49

GalaxyAsteroidsGameJFX

A simple example of a game developed in JavaFX and Java 8
Java
2
star
50

backend-bootcamp-db1-2024

JavaScript
2
star
51

PrimefacesChartZoomTest

JavaScript
2
star
52

learning-angular2

JavaScript
2
star
53

douglasjunior

2
star
54

SpaceInvaders-LibGDX

Jogo desenvolvido com os alunos de Tópicos Especiais 2015-2 da Faculdade Integrado de Campo Mourão
Java
2
star
55

libgdx-textarea-highlighting

Textarea with code highlighting for LibGDX
Java
2
star
56

backend-bootcamp-db1-2023

JavaScript
2
star
57

CodeProMetrcis2CSV

Simple program for converting CodePro output XML files to CSV
Java
2
star
58

learning-reactnative-redux

Learning Redux with React-Native
JavaScript
2
star
59

MinicursoGit-IXCONCCEPAR

Projetos utilizados durante o Minicurso sobre Git e GitHub do IX CONCCEPAR do Centro Universitário Integrado de Campo Mourão - PR
2
star
60

BichoVsCVSAnalY

Minerador de dados para unir as Issues coletadas pelo Bicho aos Scmlogs coletados pelo CVSAnalY
Java
2
star
61

FlappyBird-LibGDX

Jogo desenvolvido com os alunos de Tópicos Especiais 2015-2 da Faculdade Integrado de Campo Mourão
Java
2
star
62

Treinamento-WebMobile-ExpNordeste

Material do treinamento de desenvolvimento Web e Mobile para a empresa Expresso Nordeste de Campo Mourão
PHP
2
star
63

ProjetoIntegrador2012

Projeto interdisciplinar do 5º período do curso de TSI da UTFPR de Campo Mourão.
PHP
2
star
64

CloudTesterWeb

Implementação da biblioteca CloudTester para comparação entre APIs de acesso a plataformas de nuvem.
Java
2
star
65

SimulandoHerancaMultipla

Exemplo de simulação de herança múltipla de tipos e comportamentos utilizando o modificador "default" do Java 8.
Java
2
star
66

react-native-daylight-saving-date

Sample project to reproduce the issue: Parsing 'daylight saving date' returns wrong date and time on Android.
Objective-C
1
star
67

learning-webpack

JavaScript
1
star
68

MinicursoRest-VICONCCEPAR

Projetos utilizados durante o Minicurso sobre REST do VI CONCCEPAR da Faculdade Integrado de Campo Mourão - PR
Java
1
star
69

frontend-bootcamp-db1-2024

JavaScript
1
star
70

PayaraJCloudsTest

Test project to use JClouds with Payara.
HTML
1
star
71

learning-or-tools

Sample project to learn about Google OR Tools
Python
1
star
72

CadastroPessoaServlet

Disciplina de Programação Web da Faculdade Integrado - Aplicação de cadastro de pessoas utilizando Servlets e cliente Android
Java
1
star
73

apache-jira-miner

Automatically exported from code.google.com/p/apache-jira-miner
Java
1
star
74

react-native-environment-sample

Java
1
star
75

TestingLibrarySample

Java
1
star
76

ExerciciosPOO-PPGI

Java
1
star
77

micro-react-app-example

JavaScript
1
star
78

TestTomEE

Projeto de teste utilizando JSF, EJB, CDI, JPA e JAX-RS com TomEE Plume.
Java
1
star
79

SampleTracker

Android sample tracker
Java
1
star
80

Picaretas

Rede de anúncios em desenvolvimento pelos alunos de Programação Web 2015/2 do curso de ADS da Faculdade Integrado
Java
1
star
81

JavaScriptingTest

Java
1
star
82

node-app-with-docker

JavaScript
1
star
83

react-native-windows-test

C#
1
star
84

topicos-2017-2-frontend

JavaScript
1
star
85

Minicurso-Integrado-2017-JavaScript

Projeto do minicurso de Desenvolvimento Mobile e Backend com JavaScript da Faculdade Integrado.
JavaScript
1
star
86

aula-revisao-de-codigo

Repositório para exemplificar o processo de revisão de código fonte.
1
star
87

Labirinto-LibGDX

Exemplo de criação de labirinto utilizando o conceito de matriz com LibGDX
Java
1
star
88

dispositivos-2018-1-introducao-android

Kotlin
1
star
89

mocha-test

JavaScript
1
star
90

topicos-2017-2-backend

Repositório contendo código Node JS.
JavaScript
1
star
91

dispositivos-2018-01-exemplo-kotlin

Exemplo de projeto Android utilizando Kotlin
Kotlin
1
star
92

repositorio-teste

HTML
1
star
93

db1-code-challange-2019

JavaScript
1
star
94

learning-nextjs

JavaScript
1
star
95

CadastroProdutoServletBD

Disciplina de Programação Web da Faculdade Integrado - Aplicação de cadastro de produtos utilizando Servlets e MySQL
Java
1
star
96

SimuladorJogoDaVida

Atividade para a disciplina de Programação Orientada a Objetos - PPGI - UTFPR-CP
Java
1
star
97

react-native-modules-test

Hello World for native modules in React Native projects.
Objective-C
1
star
98

qualidade-2017-2-bowling-game-kata

Java
1
star
99

MultiOSEngineTest

Project to test the Intel Multi OS Engine
Java
1
star
100

SparkJavaTest

Project to test Spark Java Framework
Java
1
star