<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UISearchTextField/tokens",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UISearchTextField(py)tokens"
  },
  "title" : "tokens"
}
-->

# tokens

The collection of tokens in the search text field.

```
var tokens: [UISearchToken] { get set }
```

## Discussion

Use this property to access existing tokens, or to replace all tokens at once. To convert text in the search field into a token, use [`replaceTextualPortion(of:with:at:)`](/documentation/UIKit/UISearchTextField/replaceTextualPortion(of:with:at:)).

---

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)