1. Core Idea

A Form is a container used to build data-entry interfaces.

It automatically:


2. Basic Structure

Form {
    Text("Hello")
}

Usually used with sections:

Form {
    Section {
        Text("Content")
    }
}

3. Sections

Definition

Section is used to group related inputs inside a form.


Example

Form {
    Section(header: Text("Personal Info")) {
        TextField("First Name", text: $firstName)
        TextField("Last Name", text: $lastName)
    }
}