{"id":13466925,"url":"https://github.com/blsage/iTextField","last_synced_at":"2025-03-26T00:31:41.336Z","repository":{"id":52211069,"uuid":"300989803","full_name":"blsage/iTextField","owner":"blsage","description":"Fully-wrapped UITextField made to work entirely in SwiftUI","archived":false,"fork":false,"pushed_at":"2022-09-10T18:07:04.000Z","size":3735,"stargazers_count":106,"open_issues_count":6,"forks_count":25,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-29T20:33:58.284Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blsage.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-03T22:06:06.000Z","updated_at":"2024-09-08T22:09:04.000Z","dependencies_parsed_at":"2023-01-18T03:15:19.941Z","dependency_job_id":null,"html_url":"https://github.com/blsage/iTextField","commit_stats":null,"previous_names":["blsage/itextfield","benjaminsage/itextfield"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blsage%2FiTextField","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blsage%2FiTextField/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blsage%2FiTextField/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blsage%2FiTextField/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blsage","download_url":"https://codeload.github.com/blsage/iTextField/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245566099,"owners_count":20636391,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T15:00:51.440Z","updated_at":"2025-03-26T00:31:39.497Z","avatar_url":"https://github.com/blsage.png","language":"Swift","funding_links":[],"categories":["Libs"],"sub_categories":["UI"],"readme":"\u003ch1 align=\"center\"\u003e iTextField ⌨️\u003c/p\u003e\n\u003ch3 align=\"center\"\u003e A fully-wrapped `UITextField` that works entirely in SwiftUI. 🦅 \u003c/h3\u003e\n\u003cp align=\"center\"\u003e\n    \u003cstrong\u003e\u003ca href=\"#get-started\"\u003eGet Started\u003c/a\u003e\u003c/strong\u003e |\n    \u003cstrong\u003e\u003ca href=\"#examples\"\u003eExamples\u003c/a\u003e\u003c/strong\u003e |\n    \u003cstrong\u003e\u003ca href=\"#customize\"\u003eCustomize\u003c/a\u003e\u003c/strong\u003e |\n    \u003cstrong\u003e\u003ca href=\"#install\"\u003eInstall\u003c/a\u003e\u003c/strong\u003e | \n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://github.com/AlexFine/SwiftUICode/blob/master/public/assets/img/iTextField3.gif\" alt=\"CI\" /\u003e\n\u003c/p\u003e\n\n\u003cbr/\u003e\n\n\n## Get Started\n\n1. [Install](https://github.com/benjaminsage/iTextField/blob/master/INSTALL.md) `iTextField`\n2. Add `iTextField` to your project\n```swift\nimport SwiftUI\nimport iTextField\n\nstruct ContentView: View {\n    @State var text: String = \"\"\n\n    var body: some View {\n        iTextField(\"Placeholder\", text: $text)\n    }\n}\n```\n3. Customize your `iTextfield`\n\n\n## Examples\n### Starter\n\u003cimg src=\"Demo/iTextFieldDemo1Light.gif\" alt=\"drawing\" width=\"250\"/\u003e\nCustomize your text field with built-in modifiers.\n\n```swift\nimport SwiftUI\nimport iTextField\n\nstruct ContentView: View {\n    @State var text: String = \"\"\n\n    var body: some View {\n        iTextField(\"Placeholder\", text: $text)\n            .accentColor(.purple)\n            .fontFromUIFont(UIFont(name: \"Avenir\", size: 40))\n            .keyboardType(.URL)\n            .returnKeyType(.done)\n            .disableAutocorrection(true)\n            .autocapitalization(.none)\n            .padding()\n    }\n}\n```\n\n### Jump text fields\nUse the optional `isEditing` binding parameter to programmatically jump between text fields.\n```swift\nimport SwiftUI\nimport iTextField\n\nstruct ContentView: View {\n    @State var text1: String = \"\"\n    @State var text2: String = \"\"\n    @State var isSecondEditing: String = \"\"\n\n    var body: some View {\n        iTextField(\"First\", text: $text1)\n            .onReturn { isSecondEditing = true }\n        iTextField(\"Second\", text: $text2,\n                   isEditing: $isSecondEditing)\n    }\n}\n```\n\n\n## Customize\n`iTextField` has two required parameters: 1️⃣ a placeholder and 2️⃣ a `text` state. You can optionally pass in a 3️⃣rd an `isEditing` binding if you would like to programmatically focus or unfocus the text field.\n\niTextField also supports a variety of modifiers.\n\n**Example**: Change the foreground color, accent color, and text alignment with the following code block:\n```swift\niTextField(\"Placeholder\", text: $text, isEditing: $isEditing)\n    .foregroundColor(.purple)\n    .accentColor(.green)\n    .multilineTextAlignment(.leading)\n```\n\nUse this exhaustive input list to customize your text field.\n\nModifier | Description\n--- | ---\n`.fontFromUIFont(_ font: UIFont?)` | Modifies the text field’s **font** from a `UIFont` object. 🔠\n`.foregroundColor(_ color: Color?)` | Modifies the **text color** 🎨 of the text field.\n`.accentColor(_ accentColor: Color?)` | Modifies the **cursor color** 🌈 of the text field\n`.multilineTextAlignment(_ alignment: TextAlignment)` | Modifies the **text alignment** of a text field. ↔️\n`.textContentType(_ textContentType: UITextContentType?)` | Modifies the **content type** of a text field. 📧 ☎️\n`.disableAutocorrection(_ disable: Bool?)` | Modifies the text field’s **autocorrection** settings.\n`.keyboardType(_ type: UIKeyboardType)` | Modifies the text field’s **keyboard type**. 📩\n`.autocapitalization(_ style: UITextAutocapitalizationType)` | Modifies the text field’s **autocapitalization** style. 🔡\n`.returnKeyType(_ type: UIReturnKeyType)` | Modifies the text field’s **return key** type. ✅\n`.characterLimit(_ limit: Int?)` | Sets the maximum amount of characters allowed in this text field. \n`.isSecure(_ isSecure: Bool)` | Modifies the text field’s **secure entry** settings. 🔒\n`.clearsOnBeginEditing(_ shouldClear: Bool)` | Modifies the **clear-on-begin-editing** setting of a text field. ❌\n`clearsOnInsertion(_ shouldClear: Bool)` | Modifies the **clear-on-insertion** setting of a text field. 👆\n`.showsClearButton(_ showsButton: Bool)` | Modifies whether and when the text field **clear button** appears on the view. ⭕️ ❌\n`.passwordRules(_ rules: UITextInputPasswordRules)` | Modifies the text field's **password rules** 🔒. Sets secure entry to `true`.\n`.spellChecking(_ spellChecking: Bool? = nil)` | Modifies whether the text field should check the user's **spelling**.\n`.smartDashes(_ smartDashes: Bool? = nil)` | Modifies whether the text field includes **smart dashes**.\n`.smartInsertDelete(_ smartInsertDelete: Bool? = nil)` | Modifies whether the text field uses **smart insert-delete**.\n`.smartQuotes(_ smartQuotes: Bool? = nil)` | Modifies whether the text field uses **smart quotes**.\n`.disabled(disabled: Bool)` | Modifies whether the text field is **disabled**. ✋\n`.onEditingBegan(perform action: { code })` | Modifies the function called when text editing **begins**. ▶️\n`.onEdit(perform action: { code })` | Modifies the function called when the user makes any **changes** to the text in the text field. 💬\n`.onEditingEnded(perform action: { code })` | Modifies the function called when text editing **ends**. 🔚\n`.onReturn(perform action: { code })` | Modifies the function called when the user presses the **return** key. ⬇️ ➡️\n`.onClear(perform action: { code })` | Modifies the function called when the user **clears** the text field. ❌\n\n## Install \nUse the Swift package manager to install. Find instructions [here](https://github.com/benjaminsage/iPages/blob/main/INSTALL.md)😀\n\n## Help\nAs always, if you have any questions about iPhoneNumberField, we are available 24/7 to help.\n\n\u003cdiv align=\"center\"\u003e\n\n| | Reach us at | |\n--- |:---:|:---:\n📞 | +1 (415) 735-4464 | **Call**\n📧 | hello@iswiftui.com | **Email**\n📲 | +1 (415) 735-4464 | **Text**\n\n\u003c/div\u003e\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblsage%2FiTextField","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblsage%2FiTextField","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblsage%2FiTextField/lists"}