{"abstract":[{"text":"When you need information from people, design ways that make it easy for them to provide it without making mistakes.","type":"text"}],"hierarchy":{"paths":[["doc:\/\/com.apple.documentation\/documentation\/technologies","doc:\/\/com.apple.HIG\/design\/human-interface-guidelines","doc:\/\/com.apple.HIG\/design\/Human-Interface-Guidelines\/patterns"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/com.apple.HIG\/design\/Human-Interface-Guidelines\/entering-data"},"kind":"article","legalNotices":{"copyright":"Copyright &copy; 2026 Apple Inc. All rights reserved.","privacyPolicy":"https:\/\/www.apple.com\/privacy\/privacy-policy","termsOfUse":"https:\/\/www.apple.com\/legal\/internet-services\/terms\/site.html"},"metadata":{"availableLanguages":["en-US","zh-CN","ja-JP","ko-KR"],"customMetadata":{"alert-date":"2023-06-21","alert-text":"Updated to include guidance for visionOS.","supported-platforms":"ios,ipados,macos,tvos,visionos,watchos"},"images":[{"identifier":"data-entry.svg","type":"icon"},{"identifier":"patterns-entering-data-thumbnail.png","type":"card"}],"role":"article","title":"Entering data"},"primaryContentSections":[{"content":[{"inlineContent":[{"identifier":"patterns-entering-data-intro.png","type":"image"}],"type":"paragraph"},{"inlineContent":[{"text":"Entering information can be a tedious process regardless of the interaction methods people use. Improve the experience by:","type":"text"}],"type":"paragraph"},{"items":[{"content":[{"inlineContent":[{"text":"Pre-gathering as much information as possible to minimize the amount of data that people need to supply","type":"text"}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"text":"Supporting all available input methods so people can choose the method that works for them","type":"text"}],"type":"paragraph"}]}],"type":"unorderedList"},{"anchor":"Best-practices","level":2,"text":"Best practices","type":"heading"},{"inlineContent":[{"inlineContent":[{"text":"Get information from the system whenever possible.","type":"text"}],"type":"strong"},{"text":" Don’t ask people to enter information that you can gather automatically — such as from settings — or by getting their permission, such as their location or calendar information.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"inlineContent":[{"text":"Be clear about the data you need.","type":"text"}],"type":"strong"},{"text":" For example, you might display a prompt in a text field — like “username@company.com” — or provide an introductory label that describes the information, like “Email.” You can also prefill fields with reasonable default values, which can minimize decision making and speed data entry.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"inlineContent":[{"text":"Use a secure text-entry field when appropriate.","type":"text"}],"type":"strong"},{"text":" If your app or game needs sensitive data, use a field that obscures people’s input as they enter it, typically by displaying a small filled circle symbol for each character. For developer guidance, see ","type":"text"},{"identifier":"doc:\/\/com.apple.documentation\/documentation\/SwiftUI\/SecureField","isActive":true,"type":"reference"},{"text":". In tvOS, you can also configure a ","type":"text"},{"identifier":"https:\/\/developer.apple.com\/design\/human-interface-guidelines\/digit-entry-views","isActive":true,"type":"reference"},{"text":" to obscure the numerals people enter (for developer guidance, see ","type":"text"},{"identifier":"doc:\/\/com.apple.documentation\/documentation\/TVUIKit\/TVDigitEntryViewController\/isSecureDigitEntry","isActive":true,"type":"reference"},{"text":"). When you use the system-provided text field in visionOS, the system shows the entered data to the wearer, but not to anyone else; for example, a secure text field automatically blurs when people use AirPlay to stream their content.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"inlineContent":[{"text":"Never prepopulate a password field.","type":"text"}],"type":"strong"},{"text":" Always ask people to enter their password or use biometric or keychain authentication. For guidance, see ","type":"text"},{"identifier":"doc:\/\/com.apple.HIG\/design\/Human-Interface-Guidelines\/managing-accounts","isActive":true,"type":"reference"},{"text":".","type":"text"}],"type":"paragraph"},{"inlineContent":[{"inlineContent":[{"text":"When possible, offer choices instead of requiring text entry.","type":"text"}],"type":"strong"},{"text":" It’s usually easier and more efficient to choose from lists of options than to type information, even when a keyboard is conveniently available. When it makes sense, consider using a picker, menu, or other selection component to give people an easy way to provide the information you need.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"inlineContent":[{"text":"As much as possible, let people provide data by dragging and dropping it or by pasting it.","type":"text"}],"type":"strong"},{"text":" Supporting these interactions can ease data entry and make your experience feel more integrated with the rest of the system.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"inlineContent":[{"text":"Dynamically validate field values.","type":"text"}],"type":"strong"},{"text":" People can get frustrated when they have to go back and correct mistakes after filling out a lengthy form. When you verify values as soon as people enter them — and provide feedback as soon as you detect a problem — you give them the opportunity to correct errors right away. For numeric data in particular, consider using a number formatter, which automatically configures a text field to accept only numeric values. You can also configure a formatter to display the value in a specific way, such as with a certain number of decimal places, as a percentage, or as currency.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"inlineContent":[{"text":"When data entry is necessary, make sure people understand that they must provide the required data before they can proceed.","type":"text"}],"type":"strong"},{"text":" For example, if you include a Next or Continue button after a set of text fields, make the button available only after people enter the data you require.","type":"text"}],"type":"paragraph"},{"anchor":"Platform-considerations","level":2,"text":"Platform considerations","type":"heading"},{"inlineContent":[{"inlineContent":[{"text":"No additional considerations for iOS, iPadOS, tvOS, visionOS, or watchOS.","type":"text"}],"type":"emphasis"}],"type":"paragraph"},{"anchor":"macOS","level":3,"text":"macOS","type":"heading"},{"inlineContent":[{"inlineContent":[{"text":"Consider using an expansion tooltip to show the full version of clipped or truncated text in a field.","type":"text"}],"type":"strong"},{"text":" An ","type":"text"},{"inlineContent":[{"text":"expansion tooltip","type":"text"}],"type":"emphasis"},{"text":" behaves like a regular tooltip, appearing when the pointer rests on top of a field. Apps running in macOS — including iOS and iPadOS apps running on a Mac — can use an expansion tooltip to help people view the complete data they entered when a text field is too small to display it. For guidance, see ","type":"text"},{"identifier":"https:\/\/developer.apple.com\/design\/human-interface-guidelines\/offering-help#macOS-visionOS","isActive":true,"type":"reference"},{"text":".","type":"text"}],"type":"paragraph"},{"anchor":"Resources","level":2,"text":"Resources","type":"heading"},{"anchor":"Related","level":4,"text":"Related","type":"heading"},{"inlineContent":[{"identifier":"doc:\/\/com.apple.HIG\/design\/Human-Interface-Guidelines\/text-fields","isActive":true,"type":"reference"}],"type":"paragraph"},{"inlineContent":[{"identifier":"doc:\/\/com.apple.HIG\/design\/Human-Interface-Guidelines\/virtual-keyboards","isActive":true,"type":"reference"}],"type":"paragraph"},{"inlineContent":[{"identifier":"doc:\/\/com.apple.HIG\/design\/Human-Interface-Guidelines\/keyboards","isActive":true,"type":"reference"}],"type":"paragraph"},{"anchor":"Developer-documentation","level":4,"text":"Developer documentation","type":"heading"},{"inlineContent":[{"identifier":"doc:\/\/com.apple.documentation\/documentation\/SwiftUI\/Input-events","isActive":true,"type":"reference"},{"text":" — SwiftUI","type":"text"}],"type":"paragraph"},{"anchor":"Videos","level":4,"text":"Videos","type":"heading"},{"items":["doc:\/\/com.apple.documentation\/videos\/play\/wwdc2021\/10059"],"style":"compactGrid","type":"links"},{"anchor":"Change-log","level":2,"text":"Change log","type":"heading"},{"header":"row","rows":[[[{"inlineContent":[{"text":"Date","type":"text"}],"type":"paragraph"}],[{"inlineContent":[{"text":"Changes","type":"text"}],"type":"paragraph"}]],[[{"inlineContent":[{"text":"June 21, 2023","type":"text"}],"type":"paragraph"}],[{"inlineContent":[{"text":"Updated to include guidance for visionOS.","type":"text"}],"type":"paragraph"}]]],"type":"table"}],"kind":"content"}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"topicSectionsStyle":"compactGrid","references":{"9CCE8A5D-A751-441C-B88F-FB91E2D1958E":{"alt":null,"identifier":"9CCE8A5D-A751-441C-B88F-FB91E2D1958E","type":"image","variants":[{"traits":["1x"],"url":"https:\/\/devimages-cdn.apple.com\/wwdc-services\/images\/119\/9CCE8A5D-A751-441C-B88F-FB91E2D1958E\/4949_wide_250x141_1x.jpg"},{"traits":["2x"],"url":"https:\/\/devimages-cdn.apple.com\/wwdc-services\/images\/119\/9CCE8A5D-A751-441C-B88F-FB91E2D1958E\/4949_wide_250x141_2x.jpg"},{"traits":["3x"],"url":"https:\/\/devimages-cdn.apple.com\/wwdc-services\/images\/119\/9CCE8A5D-A751-441C-B88F-FB91E2D1958E\/4949_wide_250x141_3x.jpg"}]},"components-text-fields-thumbnail.png":{"alt":"A stylized representation of a text field containing a value. The image is tinted red to subtly reflect the red in the original six-color Apple logo.","identifier":"components-text-fields-thumbnail.png","type":"image","variants":[{"traits":["2x","light"],"url":"\/images\/com.apple.HIG\/components-text-fields-thumbnail@2x.png"},{"traits":["2x","dark"],"url":"\/images\/com.apple.HIG\/components-text-fields-thumbnail~dark@2x.png"}]},"components-virtual-keyboards-thumbnail.png":{"alt":"A stylized representation of a numeric keypad. The image is tinted red to subtly reflect the red in the original six-color Apple logo.","identifier":"components-virtual-keyboards-thumbnail.png","type":"image","variants":[{"traits":["2x","light"],"url":"\/images\/com.apple.HIG\/components-virtual-keyboards-thumbnail@2x.png"},{"traits":["2x","dark"],"url":"\/images\/com.apple.HIG\/components-virtual-keyboards-thumbnail~dark@2x.png"}]},"data-entry.svg":{"alt":"An icon of a pencil writing within a field that suggests data entry.","identifier":"data-entry.svg","type":"image","variants":[{"svgID":"data-entry","traits":["1x","light"],"url":"\/images\/com.apple.HIG\/data-entry.svg"}]},"doc://com.apple.HIG/design/Human-Interface-Guidelines/keyboards":{"abstract":[{"text":"A physical keyboard can be an essential input device for entering text, playing games, controlling apps, and more.","type":"text"}],"identifier":"doc:\/\/com.apple.HIG\/design\/Human-Interface-Guidelines\/keyboards","images":[{"identifier":"keyboards.svg","type":"icon"},{"identifier":"inputs-keyboards-thumbnail.png","type":"card"}],"kind":"article","role":"article","title":"Keyboards","type":"topic","url":"\/design\/human-interface-guidelines\/keyboards"},"doc://com.apple.HIG/design/Human-Interface-Guidelines/managing-accounts":{"abstract":[{"text":"When it doesn’t create an unnecessary barrier to your experience, an account can be a convenient way for people to access their content and track personal details.","type":"text"}],"identifier":"doc:\/\/com.apple.HIG\/design\/Human-Interface-Guidelines\/managing-accounts","images":[{"identifier":"managing-accounts.svg","type":"icon"},{"identifier":"patterns-managing-accounts-thumbnail.png","type":"card"}],"kind":"article","role":"article","title":"Managing accounts","type":"topic","url":"\/design\/human-interface-guidelines\/managing-accounts"},"doc://com.apple.HIG/design/Human-Interface-Guidelines/patterns":{"abstract":[{"text":"Get design guidance for supporting common user actions, tasks, and experiences.","type":"text"}],"identifier":"doc:\/\/com.apple.HIG\/design\/Human-Interface-Guidelines\/patterns","images":[{"identifier":"overview.svg","type":"icon"},{"identifier":"patterns.png","type":"card"}],"kind":"article","role":"collectionGroup","title":"Patterns","type":"topic","url":"\/design\/human-interface-guidelines\/patterns"},"doc://com.apple.HIG/design/Human-Interface-Guidelines/text-fields":{"abstract":[{"text":"A text field is a rectangular area in which people enter or edit small, specific pieces of text.","type":"text"}],"identifier":"doc:\/\/com.apple.HIG\/design\/Human-Interface-Guidelines\/text-fields","images":[{"identifier":"components-text-fields-thumbnail.png","type":"card"}],"kind":"article","role":"article","title":"Text fields","type":"topic","url":"\/design\/human-interface-guidelines\/text-fields"},"doc://com.apple.HIG/design/Human-Interface-Guidelines/virtual-keyboards":{"abstract":[{"text":"On devices without physical keyboards, the system offers various types of virtual keyboards people can use to enter data.","type":"text"}],"identifier":"doc:\/\/com.apple.HIG\/design\/Human-Interface-Guidelines\/virtual-keyboards","images":[{"identifier":"components-virtual-keyboards-thumbnail.png","type":"card"}],"kind":"article","role":"article","title":"Virtual keyboards","type":"topic","url":"\/design\/human-interface-guidelines\/virtual-keyboards"},"doc://com.apple.HIG/design/human-interface-guidelines":{"abstract":[{"text":"The HIG contains guidance and best practices that can help you design a","type":"text"},{"text":" ","type":"text"},{"text":"great experience for any Apple platform.","type":"text"}],"identifier":"doc:\/\/com.apple.HIG\/design\/human-interface-guidelines","images":[{"identifier":"human-interface-guidelines-page-image-card.png","type":"card"}],"kind":"article","role":"collection","title":"Human Interface Guidelines","type":"topic","url":"\/design\/human-interface-guidelines"},"doc://com.apple.documentation/documentation/SwiftUI/Input-events":{"abstract":[{"text":"Respond to input from a hardware device, like a keyboard or a Touch Bar.","type":"text"}],"identifier":"doc:\/\/com.apple.documentation\/documentation\/SwiftUI\/Input-events","kind":"article","role":"collectionGroup","title":"Input events","type":"topic","url":"\/documentation\/swiftui\/input-events"},"doc://com.apple.documentation/documentation/SwiftUI/SecureField":{"abstract":[{"text":"A control into which people securely enter private text.","type":"text"}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"SecureField"}],"identifier":"doc:\/\/com.apple.documentation\/documentation\/SwiftUI\/SecureField","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"SecureField"}],"role":"symbol","title":"SecureField","type":"topic","url":"\/documentation\/swiftui\/securefield"},"doc://com.apple.documentation/documentation/TVUIKit/TVDigitEntryViewController/isSecureDigitEntry":{"abstract":[{"text":"A Boolean value that indicates whether an entered digit is immediately obscured.","type":"text"}],"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"isSecureDigitEntry"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:Sb","text":"Bool"}],"identifier":"doc:\/\/com.apple.documentation\/documentation\/TVUIKit\/TVDigitEntryViewController\/isSecureDigitEntry","kind":"symbol","role":"symbol","title":"isSecureDigitEntry","type":"topic","url":"\/documentation\/tvuikit\/tvdigitentryviewcontroller\/issecuredigitentry"},"doc://com.apple.documentation/documentation/technologies":{"abstract":[],"identifier":"doc:\/\/com.apple.documentation\/documentation\/technologies","kind":"technologies","role":"overview","title":"Technologies","type":"topic","url":"\/documentation\/technologies"},"doc://com.apple.documentation/videos/play/wwdc2021/10059":{"abstract":[{"text":"Discover the latest updates and improvements to UIKit and learn how to build better iPadOS, iOS, and Mac Catalyst apps. We’ll take you through UI refinements, productivity updates, and API enhancements, and help you explore performance improvements and security & privacy features.","type":"text"}],"identifier":"doc:\/\/com.apple.documentation\/videos\/play\/wwdc2021\/10059","images":[{"identifier":"9CCE8A5D-A751-441C-B88F-FB91E2D1958E","type":"card"}],"kind":"article","role":"article","title":"What's new in UIKit","type":"topic","url":"https:\/\/developer.apple.com\/videos\/play\/wwdc2021\/10059"},"https://developer.apple.com/design/human-interface-guidelines/digit-entry-views":{"identifier":"https:\/\/developer.apple.com\/design\/human-interface-guidelines\/digit-entry-views","title":"digit entry view","titleInlineContent":[{"text":"digit entry view","type":"text"}],"type":"link","url":"https:\/\/developer.apple.com\/design\/human-interface-guidelines\/digit-entry-views"},"https://developer.apple.com/design/human-interface-guidelines/offering-help#macOS-visionOS":{"identifier":"https:\/\/developer.apple.com\/design\/human-interface-guidelines\/offering-help#macOS-visionOS","title":"Offering help > macOS, visionOS","titleInlineContent":[{"text":"Offering help > macOS, visionOS","type":"text"}],"type":"link","url":"https:\/\/developer.apple.com\/design\/human-interface-guidelines\/offering-help#macOS-visionOS"},"human-interface-guidelines-page-image-card.png":{"alt":"An illustration of several Liquid Glass components such as toggles, sliders, and buttons, atop a neutral background. The transparent components cast shadows on the background and allow their colored elements, like a blue slider track and a green toggle backing, to show through, highlighting the Liquid Glass material's lensing effect.","identifier":"human-interface-guidelines-page-image-card.png","type":"image","variants":[{"traits":["2x","light"],"url":"\/images\/com.apple.HIG\/human-interface-guidelines-page-image-card@2x.png"}]},"inputs-keyboards-thumbnail.png":{"alt":"A sketch of a keyboard, suggesting keyboard input. The image is tinted purple to subtly reflect the purple in the original six-color Apple logo.","identifier":"inputs-keyboards-thumbnail.png","type":"image","variants":[{"traits":["2x","light"],"url":"\/images\/com.apple.HIG\/inputs-keyboards-thumbnail@2x.png"},{"traits":["2x","dark"],"url":"\/images\/com.apple.HIG\/inputs-keyboards-thumbnail~dark@2x.png"}]},"keyboards.svg":{"alt":"An icon of a keyboard that suggests keyboard input.","identifier":"keyboards.svg","type":"image","variants":[{"svgID":"keyboards","traits":["1x","light"],"url":"\/images\/com.apple.HIG\/keyboards.svg"}]},"managing-accounts.svg":{"alt":"An icon of a person that suggests personal information.","identifier":"managing-accounts.svg","type":"image","variants":[{"svgID":"managing-accounts","traits":["1x","light"],"url":"\/images\/com.apple.HIG\/managing-accounts.svg"}]},"overview.svg":{"alt":"An icon of a grid comprised of four squares.","identifier":"overview.svg","type":"image","variants":[{"svgID":"overview","traits":["1x","light"],"url":"\/images\/com.apple.HIG\/overview.svg"}]},"patterns-entering-data-intro.png":{"alt":"A sketch of a pencil writing within a field, suggesting data entry. The image is overlaid with rectangular and circular grid lines and is tinted orange to subtly reflect the orange in the original six-color Apple logo.","identifier":"patterns-entering-data-intro.png","type":"image","variants":[{"traits":["2x","light"],"url":"\/images\/com.apple.HIG\/patterns-entering-data-intro@2x.png"},{"traits":["2x","dark"],"url":"\/images\/com.apple.HIG\/patterns-entering-data-intro~dark@2x.png"}]},"patterns-entering-data-thumbnail.png":{"alt":"A sketch of a pencil writing within a field, suggesting data entry. The image is tinted orange to subtly reflect the orange in the original six-color Apple logo.","identifier":"patterns-entering-data-thumbnail.png","type":"image","variants":[{"traits":["2x","light"],"url":"\/images\/com.apple.HIG\/patterns-entering-data-thumbnail@2x.png"},{"traits":["2x","dark"],"url":"\/images\/com.apple.HIG\/patterns-entering-data-thumbnail~dark@2x.png"}]},"patterns-managing-accounts-thumbnail.png":{"alt":"A sketch of a person, suggesting personal information. The image is tinted orange to subtly reflect the orange in the original six-color Apple logo.","identifier":"patterns-managing-accounts-thumbnail.png","type":"image","variants":[{"traits":["2x","light"],"url":"\/images\/com.apple.HIG\/patterns-managing-accounts-thumbnail@2x.png"},{"traits":["2x","dark"],"url":"\/images\/com.apple.HIG\/patterns-managing-accounts-thumbnail~dark@2x.png"}]},"patterns.png":{"alt":"","identifier":"patterns.png","type":"image","variants":[{"traits":["2x","light"],"url":"\/images\/com.apple.HIG\/patterns@2x.png"},{"traits":["2x","dark"],"url":"\/images\/com.apple.HIG\/patterns~dark@2x.png"}]}},"variantOverrides":[{"patch":[{"op":"replace","path":"\/references\/doc:~1~1com.apple.documentation~1documentation~1TVUIKit~1TVDigitEntryViewController~1isSecureDigitEntry\/title","value":"secureDigitEntry"},{"op":"replace","path":"\/references\/doc:~1~1com.apple.documentation~1documentation~1TVUIKit~1TVDigitEntryViewController~1isSecureDigitEntry\/fragments","value":[{"kind":"identifier","text":"secureDigitEntry"}]},{"op":"add","path":"\/references\/doc:~1~1com.apple.documentation~1documentation~1TVUIKit~1TVDigitEntryViewController~1isSecureDigitEntry\/navigatorTitle","value":[{"kind":"identifier","text":"secureDigitEntry"}]}],"traits":[{"interfaceLanguage":"occ"}]}]}