---
title: "searchDictationBehavior(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/searchdictationbehavior(_:)"
---

# searchDictationBehavior(_:)

Configures the dictation behavior for any search fields configured by the searchable modifier.

## Declaration

```swift
nonisolated func searchDictationBehavior(_ dictationBehavior: TextInputDictationBehavior) -> some View

```

## Discussion

Discussion By default, search fields on visionOS will automatically start dictation when looking at the dictation button in the search field. You can change this behavior by providing a value of preventDictation to this modifier. See the TextInputDictationBehavior type for more information on the available dictation behaviors.

## See Also

### Dictating text

- [TextInputDictationActivation](swiftui/textinputdictationactivation.md)
- [TextInputDictationBehavior](swiftui/textinputdictationbehavior.md)
