Swiftpack.co - HumorousGhost/KeyboardHost as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by HumorousGhost.
HumorousGhost/KeyboardHost 1.0.1
keyboard monitor for swiftui
⭐️ 1
🕓 2 weeks ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/HumorousGhost/KeyboardHost.git", from: "1.0.1")


This project is only for SwiftUI

When View uses ignoresSafeArea or edgesIgnoringSafeArea(.bottom)

this framework can be used because TextField and TextEditor cannot make the keyboard bounce

Encapsulated UITextView, UITextField can also be used

Supported Platforms

  • iOS 13.0
  • macOS 10.15
  • tvOS 13.0
  • watchOS 6.0


    @State private var text: String = ""
    var body: some View {
        VStack {
            KeyboardHost {
                TextField("please enter text", text: $text)
                    .frame(width: 200, height: 40, alignment: .center)
                    .padding(.bottom, 20)


You can add KeyboardHost to an Xcode project by adding it as a package dependency.

  1. From the File menu, select Swift PackagesAdd Package Dependency…
  2. Enter https://github.com/HumorousGhost/KeyboardHost into the package repository URL text field
  3. Link KeyboardHost to your application target


Stars: 1
Last commit: 2 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics