---
title: "textContentType(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/textcontenttype(_:)-ufdv"
---

# textContentType(_:)

Sets the text content type for this view, which the system uses to offer suggestions while the user enters text on an iOS or tvOS device.

## Declaration

```swift
nonisolated func textContentType(_ textContentType: UITextContentType?) -> some View

```

## Parameters

- `textContentType`: One of the content types available in the doc://com.apple.documentation/documentation/UIKit/UITextContentType structure that identify the semantic meaning expected for a text-entry area. These include support for email addresses, location names, URLs, and telephone numbers, to name just a few.

## Discussion

Discussion Use this method to set the content type for input text. For example, you can configure a TextField for the entry of email addresses: TextField("Enter your email", text: $emailAddress)     .textContentType(.emailAddress)

## See Also

### Managing text entry

- [autocorrectionDisabled(_:)](swiftui/view/autocorrectiondisabled(_:).md)
- [autocorrectionDisabled](swiftui/environmentvalues/autocorrectiondisabled.md)
- [keyboardType(_:)](swiftui/view/keyboardtype(_:).md)
- [scrollDismissesKeyboard(_:)](swiftui/view/scrolldismisseskeyboard(_:).md)
- [textContentType(_:)](swiftui/view/textcontenttype(_:).md)
- [textInputAutocapitalization(_:)](swiftui/view/textinputautocapitalization(_:).md)
- [TextInputAutocapitalization](swiftui/textinputautocapitalization.md)
- [textInputCompletion(_:)](swiftui/view/textinputcompletion(_:).md)
- [textInputSuggestions(_:)](swiftui/view/textinputsuggestions(_:).md)
- [textInputSuggestions(_:content:)](swiftui/view/textinputsuggestions(_:content:).md)
- [textInputSuggestions(_:id:content:)](swiftui/view/textinputsuggestions(_:id:content:).md)
- [textContentType(_:)](swiftui/view/textcontenttype(_:)-4dqqb.md)
- [textContentType(_:)](swiftui/view/textcontenttype(_:)-6fic1.md)
- [textInputFormattingControlVisibility(_:for:)](swiftui/view/textinputformattingcontrolvisibility(_:for:).md)
- [TextInputFormattingControlPlacement](swiftui/textinputformattingcontrolplacement.md)
