Theming

Overview

The Keyboard SDK allows you to configure the appearance of the keyboard by changing colors, font, background, and more, for different parts of the keyboard.

To modify the keyboard’s appearance, you can utilize the StyleConfiguration class. It provides the means to modify two key elements:

  1. KeyboardTheme: It holds all the different colors, fonts, background that you might want to change.
  2. Spacebar logo: You can modify this property to include a spacebar logo.

Themes

Default Theme

When you install the Keyboard SDK the default theme resembles the appearance of the stock keyboard. This default theme is available for both light and dark mode and it is selected automatically by the system:


Virtual keyboard light mode Virtual keyboard dark mode

If you want to use the default theme, just call the StyleConfiguration().dictForceTheme for the light theme.

Custom Theme

If you want to modify the by default theme, just create your own KeyboardTheme and configure the SytleConfiguration with this new theme.

The main configurations include:

  • Key background color, Key font color
  • Background color, background image
  • Suggestions background color, higlighted color and selected color.
  • Action keys colors, font color
  • Font

If something needs to be added or if you find an error in our documentation, please let us know either on our GitHub or Discord.

Last updated on September 6, 2023