---
title: keyboardType
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uitextinputtraits/keyboardtype
---

# keyboardType

The keyboard type for the text object.

## Declaration

```swift
optional var keyboardType: UIKeyboardType { get set }
```

## Mentioned in

Configuring a custom keyboard interface

## Discussion

Discussion Text objects can be targeted for specific types of input, such as plain text, email, numeric entry, and so on. The keyboard style identifies what keys are available on the keyboard and which ones appear by default. The default value for this property is UIKeyboardType.default.

## See Also

### Configuring the keyboard appearance

- [UIKeyboardType](uikit/uikeyboardtype.md)
- [keyboardAppearance](uikit/uitextinputtraits/keyboardappearance.md)
- [UIKeyboardAppearance](uikit/uikeyboardappearance.md)
- [returnKeyType](uikit/uitextinputtraits/returnkeytype.md)
- [UIReturnKeyType](uikit/uireturnkeytype.md)
- [textContentType](uikit/uitextinputtraits/textcontenttype.md)
- [UITextContentType](uikit/uitextcontenttype.md)
