# Text fields

Source: https://developer.apple.com/design/human-interface-guidelines/text-fields
Skill: hig-components-controls
Snapshot: 2025-02-02

---
<!-- hig-doctor:attribution -->
> **Source**: Apple Inc. Canonical content at https://developer.apple.com/design/human-interface-guidelines/text-fields.
> This file is a structured index of that content, snapshot 2025-02-02.
> Apple HIG text and imagery are © Apple Inc.; this repository provides organization and cross-referencing for AI agent consumption only.

# Text fields

## Best practices

**Use a text field to request a small amount of information, such as a name or an email address.**

**Show a hint in a text field to help communicate its purpose.**

**Use secure text fields to hide private data.**

**To the extent possible, match the size of a text field to the quantity of anticipated text.**

**Evenly space multiple text fields.**

**Ensure that tabbing between multiple fields flows as people expect.**

**Validate fields when it makes sense.**

**Use a number formatter to help with numeric data.**

**Adjust line breaks according to the needs of the field.**

**Consider using an expansion tooltip to show the full version of clipped or truncated text.**

**In iOS, iPadOS, tvOS, and visionOS apps, show the appropriate keyboard type.**

**Minimize text entry in your tvOS and watchOS apps.**

## Platform considerations

### iOS, iPadOS

**Display a Clear button in the trailing end of a text field to help people erase their input.**

**Use images and buttons to provide clarity and functionality in text fields.**

### macOS

**Consider using a combo box if you need to pair text input with a list of choices.**

### watchOS

**Present a text field only when necessary.**

---

<!-- hig-doctor:canonical-footer -->
For the complete guidance, including worked examples and illustrations, see the canonical page: https://developer.apple.com/design/human-interface-guidelines/text-fields

