0PricingLogin
SwiftUI Academy · Lesson

Keyboard Types & Placeholders

Configure keyboard, prompt, and submit behavior.

Shape the Input

A bare TextField accepts anything. With a few modifiers you can shape the keyboard, the hint, and what happens on submit. ⌨️

Choosing a Keyboard

The keyboardType modifier picks which on-screen keyboard appears. An email field deserves the email layout, not the full alphabet.

TextField("Email", text: $email)
  .keyboardType(.emailAddress)

All lessons in this course

  1. Binding a TextField to State
  2. Keyboard Types & Placeholders
  3. SecureField for Passwords
  4. Live Input Validation
← Back to SwiftUI Academy