---
title: "textInputBorderShape(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
platforms: [iOS 27.0+, iPadOS 27.0+, Mac Catalyst 27.0+, macOS 27.0+, tvOS 27.0+, visionOS 27.0+, watchOS 27.0+]
path: "swiftui/view/textinputbordershape(_:)"
---

# textInputBorderShape(_:)

Sets the border shape for text input controls in the view hierarchy.

## Declaration

```swift
nonisolated func textInputBorderShape(_ shape: TextInputBorderShape) -> some View

```

## Parameters

- `shape`: The shape to use for the border of text input controls.

## Discussion

Discussion Use this modifier to customize the border shape of TextField and other text input controls. The shape can be applied to individual controls or to a container to affect all text input controls within it. In this example, a search field and button both use a capsule shape: HStack {     TextField("Search", text: $searchText)     Button("Go", action: search) } .buttonBorderShape(.capsule) .textInputBorderShape(.capsule)

## 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)
- [TextInputBorderShape](swiftui/textinputbordershape.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)
- [textContentType(_:)](swiftui/view/textcontenttype(_:)-ufdv.md)
