All Projects → michaelhenry → Keyboardavoider

michaelhenry / Keyboardavoider

Licence: mit
The missing interactive keyboard in SwiftUI for iOS

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Keyboardavoider

Jp01
JP01 - Arisu Custom CNC Aluminum Unibody Keyboard Case
Stars: ✭ 84 (-20%)
Mutual labels:  keyboard
Hallelujahim
hallelujahIM(哈利路亚 英文输入法) is an intelligent English input method with auto-suggestions and spell check features, Mac only.
Stars: ✭ 1,334 (+1170.48%)
Mutual labels:  keyboard
Digitalkeyboard
手动实现简单的身份证数字键盘
Stars: ✭ 99 (-5.71%)
Mutual labels:  keyboard
Audiokitsynthone
AudioKit Synth One: Open-Source iOS Synthesizer App
Stars: ✭ 1,258 (+1098.1%)
Mutual labels:  keyboard
Evscript
A tiny sandboxed Dyon scripting environment for evdev input devices that lets you do e.g. xcape in Wayland
Stars: ✭ 91 (-13.33%)
Mutual labels:  keyboard
Bigbagkbdtrixxkb
"DreymaR's Big Bag of Keyboard Tricks" for *nix with XKB
Stars: ✭ 95 (-9.52%)
Mutual labels:  keyboard
Arisu Case
Case design files for Arisu Keyboard
Stars: ✭ 83 (-20.95%)
Mutual labels:  keyboard
Uiviewcontroller Keyboardadditions
Tiny UIViewController category that provides handy way for keyboard handling logic.
Stars: ✭ 102 (-2.86%)
Mutual labels:  keyboard
Gohook
GoHook, Go global keyboard and mouse listener hook
Stars: ✭ 94 (-10.48%)
Mutual labels:  keyboard
Swipeselection
An improvement to iOS's text editing that allows you to move the cursor and select text using gestures on the keyboard itself.
Stars: ✭ 97 (-7.62%)
Mutual labels:  keyboard
Simple Keyboard
Javascript Virtual Keyboard - Customizable, responsive and lightweight
Stars: ✭ 1,275 (+1114.29%)
Mutual labels:  keyboard
Awesome Mechanical Keyboard
⌨️ A curated list of Open Source Mechanical Keyboard resources.
Stars: ✭ 1,294 (+1132.38%)
Mutual labels:  keyboard
Minikbd
Stars: ✭ 97 (-7.62%)
Mutual labels:  keyboard
Quickcut
QuickCut is a cross-platform keyboard manager that both facilitates key mapping and allows the configuration of global hotkeys triggering user defined actions.
Stars: ✭ 84 (-20%)
Mutual labels:  keyboard
Lot60 Ble Keyboard
A 60% bluetooth keyboard (Hardware)
Stars: ✭ 100 (-4.76%)
Mutual labels:  keyboard
Rxkeyboard
Reactive Keyboard in iOS
Stars: ✭ 1,246 (+1086.67%)
Mutual labels:  keyboard
Vehicle Keyboard Ios
停车王车牌号码专用键盘 - iOS
Stars: ✭ 96 (-8.57%)
Mutual labels:  keyboard
Ally.js
JavaScript library to help modern web applications with accessibility concerns
Stars: ✭ 1,447 (+1278.1%)
Mutual labels:  keyboard
Lhskeyboardadjusting
An easy-to-use Objective-C protocol that automatically resizes / adjusts views when a keyboard appears on iOS.
Stars: ✭ 101 (-3.81%)
Mutual labels:  keyboard
React Native Dismiss Keyboard
A simple way to dismiss the keyboard programmatically in a react native application
Stars: ✭ 97 (-7.62%)
Mutual labels:  keyboard

Screenshot Screenshot

Deployment status Version License Platform

⌨️ KeyboardAvoider {}

A KeyboardAvoider for SwiftUI. Inspired by the simplicity of keyboard_avoider in Flutter.

Features

  • Autoscroll to TextField
  • Swipe keyboard to dismiss

Installation

Swift Package Manager

Create a Package.swift file.

import PackageDescription

let package = Package(
  name: "TestProject",
  dependencies: [
    .package(url: "https://github.com/michaelhenry/KeyboardAvoider.git", from: "1.0.0")
  ]
)

Cocoapods

target 'MyApp' do
  pod 'KeyboardAvoider', '~> 1.0'
end

How to use

import KeyboardAvoider

KeyboardAvoider {
  // ... Your view with TextFields
}

Example:

KeyboardAvoider {
    VStack {
        TextField("First name", text: self.$firstname)
        TextField("Last name", text: self.$lastname)
        TextField("Email", text: self.$email)
        TextField("Password", text: self.$password)
        TextField("Confirm password", text: self.$password)
        Button("Sign Up") {

        }
        Button("Already have an account?") {

        }
    }
    .padding(.horizontal, 16.0)
}

Or in case you don't want to make your view scrollable, you can just only apply the .avoidKeyboard() into your main view.

    VStack {
        TextField("First name", text: self.$firstname)
        TextField("Last name", text: self.$lastname)
        TextField("Email", text: self.$email)
        TextField("Password", text: self.$password)
        TextField("Confirm password", text: self.$password)
        Button("Sign Up") {

        }
        Button("Already have an account?") {

        }
    }
    .avoidKeyboard()

FAQ

  • How to remove the extra space between the textfield and the keyboard

    You can remove it by ignoring the safe area - bottom. Please see the Sample Project

 .edgesIgnoringSafeArea(.bottom)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].