Previews

KeyboardKit has extension keyboard preview support.

πŸ‘

Overview

SwiftUI previews are a great way to work on your design in Xcode, without having to launch an app. Just update your views and models, and the preview will update.

KeyboardKit has preview-specific services and state, that can be used in your previews. This makes it easy to set up and preview your keyboard-specific views directly in Xcode.

KeyboardKit Pro unlocks powerful keyboard and theme previews that can be used both within SwiftUI previews, as well as in the main app target.

Preview-specific state and services

KeyboardKit has preview values for all services & state. For instance, KeyboardContext has a preview context, the KeyboardInputViewController has a preview controller, etc.

These types make it easy to use KeyboardKit types in SwiftUI previews. For instance, this is how you can pass in state and services into a custom view:

#Preview {

    CustomView(actionHandler: .preview)
        .environmentObject(KeyboardContext.preview)
}

You can take a look at the source code of the various views in the library for inspiration.

πŸ‘‘ KeyboardKit Pro

KeyboardKit Pro unlocks powerful system keyboard previews.

For instance, a KeyboardViewPreview can be used to preview a KeyboardView in different ways.

There is also a lightweight SystemKeyboardButtonPreview that can preview many themes at once.

System Keyboard Button Preview

Documentation

The information on this page is shortened to be easier to overview. For more information see the online documentation. For KeyboardKit pro, see the pro documentation.


Core Features

KeyboardKit is packed with features to help you build amazing custom keyboards. You can upgrade to KeyboardKit Pro to unlock pro features.

πŸ‘‘ Pro Features

KeyboardKit Pro unlocks pro features that take your keyboard to the next level. Go pro today!