<!--
{
  "availability" : [
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/TextFieldLink",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI13TextFieldLinkV"
  },
  "title" : "TextFieldLink"
}
-->

# TextFieldLink

A control that requests text input from the user when pressed.

```
nonisolated struct TextFieldLink<Label> where Label : View
```

## Overview

A `TextFieldLink` should be used to request text input from the user through a button interface.

## Topics

### Creating a text field link

[`init(_:prompt:onSubmit:)`](/documentation/SwiftUI/TextFieldLink/init(_:prompt:onSubmit:))

Creates a TextFieldLink which when pressed will request text input from
the user.

[`init(prompt:label:onSubmit:)`](/documentation/SwiftUI/TextFieldLink/init(prompt:label:onSubmit:))

Creates a TextFieldLink which when pressed will request text input from the user.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)