---
title: "displayName(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/controlwidgetconfiguration/displayname(_:)"
---

# displayName(_:)

Sets the name shown for the control when a user adds or edits it, using the specified string.

## Declaration

```swift
@MainActor @preconcurrency func displayName(_ displayName: LocalizedStringResource) -> some ControlWidgetConfiguration

```
