<!--
{
  "documentType" : "article",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/text-field",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Text Field"
}
-->

# Text Field

Provide a simple interface for displaying and editing text, including support for password fields and secure forms of text entry.

## Topics

### Views

[`NSTextField`](/documentation/AppKit/NSTextField)

Text the user can select or edit to send an action message to a target when the user presses the Return key.

[`NSSecureTextField`](/documentation/AppKit/NSSecureTextField)

A text field that hides the typed text.

### Management

[`NSTextFieldDelegate`](/documentation/AppKit/NSTextFieldDelegate)

A protocol that a text field delegate can use to control its field editor action menu.

[`NSControlTextEditingDelegate`](/documentation/AppKit/NSControlTextEditingDelegate)

A set of optional methods implemented by delegates of [`NSControl`](/documentation/AppKit/NSControl) subclasses to respond to editing actions.

### Cell

[`NSTextFieldCell`](/documentation/AppKit/NSTextFieldCell)

An object that enhances the text display capabilities of a cell.

[`NSSecureTextFieldCell`](/documentation/AppKit/NSSecureTextFieldCell)

A text field whose value is hidden 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)