{
  "accessibility" : [
    "The visible label is the accessibility label of the field; \"Required\" is appended for required fields.",
    "An error is an icon plus a sentence, read as \"Error: …\"; a confirmation is a check mark plus a sentence. Neither is colour alone.",
    "The leading symbol is decorative and hidden from VoiceOver.",
    "Label, value and messages follow Dynamic Type and wrap.",
    "Default messages are localised (English, French); lengths count user-perceived characters."
  ],
  "category" : "forms",
  "changelog" : [
    {
      "changes" : [
        "Release 1.1.0: see the project changelog."
      ],
      "date" : "2026-12-03",
      "version" : "1.1.0"
    },
    {
      "changes" : [
        "Initial release."
      ],
      "date" : "2026-12-02",
      "version" : "1.0.0"
    }
  ],
  "dependencies" : [
    {
      "id" : "glass-forms-support",
      "version" : "1.1.0"
    },
    {
      "id" : "glass-foundation",
      "version" : "1.1.0"
    }
  ],
  "description" : "Text field with label, validation message, focus handling and keyboard configuration.",
  "examples" : [
    {
      "code" : "import SwiftUI\nimport SPGlassKit\n\npublic struct GlassTextFieldExample: GlassExample {\n    public static let componentID = \"glass-text-field\"\n    @State private var name = \"\"\n    @State private var email = \"\"\n    @State private var handle = \"taken\"\n    @State private var locked = \"Read-only value\"\n    @FocusState private var emailFocused: Bool\n\n    public init() {}\n\n    public var body: some View {\n        ScrollView {\n            VStack(alignment: .leading, spacing: 20) {\n                GlassTextField(\n                    \"Full name\",\n                    text: $name,\n                    prompt: \"Ada Lovelace\",\n                    validation: GlassFieldValidation(.required(), .minLength(2)),\n                    input: .name\n                )\n                .onSubmit { emailFocused = true }\n\n                GlassTextField(\n                    \"Email\",\n                    text: $email,\n                    prompt: \"name@example.com\",\n                    helper: \"Used only for the receipt.\",\n                    systemImage: \"envelope\",\n                    validation: GlassFieldValidation(.required(), .custom(message: \"Enter an address such as name@example.com\") { $0.contains(\"@\") && $0.contains(\".\") }),\n                    input: .email,\n                    focus: $emailFocused\n                )\n\n                GlassTextField(\n                    \"Username\",\n                    text: $handle,\n                    validation: GlassFieldValidation(.maxLength(12)),\n                    validateOn: .always,\n                    errorMessage: handle == \"taken\" ? \"This username is already taken.\" : nil,\n                    input: .username\n                )\n\n                GlassTextField(\"Account\", text: $locked)\n                    .disabled(true)\n\n                Button(\"Focus the email field\") { emailFocused = true }\n            }\n            .padding()\n        }\n    }\n}\n\n#Preview(\"GlassTextField\") { GlassTextFieldExample().glassTheme(.aurora) }\n",
      "title" : "GlassTextField example"
    }
  ],
  "files" : [
    {
      "bytes" : 6000,
      "path" : "Forms/Forms/GlassTextField.swift",
      "sha256" : "61b3b6a03fcb040ce464b9264850ed5dbf3ef4b56a52c75c3c40d2ddc905f407"
    }
  ],
  "frameworks" : [

  ],
  "id" : "glass-text-field",
  "kind" : "content-component",
  "license" : "MIT",
  "minimumOS" : {
    "iOS" : "26.0",
    "iPadOS" : "26.0",
    "macOS" : "26.0"
  },
  "name" : "GlassTextField",
  "platforms" : [
    "iOS",
    "iPadOS",
    "macOS"
  ],
  "schemaVersion" : 1,
  "sha256" : "6775efc9534a194d455d1e0c5f7bdb63718c80263577011b9b35c6914bc237cc",
  "symbols" : [
    "GlassTextField"
  ],
  "version" : "1.1.0"
}
