michaelhenry / Keyboardavoider
Licence: mit
The missing interactive keyboard in SwiftUI for iOS
Stars: ✭ 105
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
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
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
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
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
⌨️ 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].