{"id":2962,"url":"https://github.com/iDhaval/DTTextField","last_synced_at":"2025-08-06T16:31:36.453Z","repository":{"id":38418769,"uuid":"87069790","full_name":"iDhaval/DTTextField","owner":"iDhaval","description":"DTTextField is a custom textfield with floating placeholder and error label","archived":false,"fork":false,"pushed_at":"2022-11-25T09:24:34.000Z","size":822,"stargazers_count":333,"open_issues_count":5,"forks_count":56,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-07-28T18:54:12.475Z","etag":null,"topics":["dttextfield","error-label","floating-placeholder","swift","uitextfield","xcode"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iDhaval.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":"2017-04-03T12:08:47.000Z","updated_at":"2025-06-14T11:37:07.000Z","dependencies_parsed_at":"2022-08-17T05:30:38.108Z","dependency_job_id":null,"html_url":"https://github.com/iDhaval/DTTextField","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/iDhaval/DTTextField","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iDhaval%2FDTTextField","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iDhaval%2FDTTextField/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iDhaval%2FDTTextField/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iDhaval%2FDTTextField/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iDhaval","download_url":"https://codeload.github.com/iDhaval/DTTextField/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iDhaval%2FDTTextField/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269112512,"owners_count":24361988,"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","status":"online","status_checked_at":"2025-08-06T02:00:09.910Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["dttextfield","error-label","floating-placeholder","swift","uitextfield","xcode"],"created_at":"2024-01-05T20:16:27.515Z","updated_at":"2025-08-06T16:31:36.123Z","avatar_url":"https://github.com/iDhaval.png","language":"Swift","funding_links":[],"categories":["UI","Libs","TextField","UI [🔝](#readme)"],"sub_categories":["TextField \u0026 TextView","UI","Other free courses"],"readme":"# DTTextField\n\n[![Version](https://img.shields.io/badge/Pod-V0.7.0-green.svg)](https://github.com/iDhaval/DTTextField/releases/tag/0.7.0)\n[![License](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/iDhaval/DTTextField/blob/master/LICENSE)\n[![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/matteocrippa/awesome-swift)\n[![Platform](https://img.shields.io/badge/Language-Swift_5.0-orange.svg)](https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/)\n![Xcode](https://img.shields.io/badge/Xcode-11.0-blue.svg)\n\n![Demo](https://github.com/iDhaval/DTTextField/blob/master/DTTextField.gif?raw=true)\n\n## Introduction\n\nDTTextField is a UITextField library with floating placeholder and error label.\n\nFloating placeholder inspired from [JVFloatLabeledTextField](https://github.com/jverdi/JVFloatLabeledTextField) :+1:.\n\n## Example\n\nClone the repo and run the example project from the Example directory.\n\n## Requirements\n\n* Xcode 11.0+\n* Swift 5.0+\n\n## Installation\n\n### CocoaPods\n\nDTTextField is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'DTTextField'\n```\n\n### Swift Package Manager\n\nClick `File` -\u003e `Add Packages...`, enter [DTTextField repo's URL](https://github.com/iDhaval/DTTextField).\n\n```swift\nhttps://github.com/iDhaval/DTTextField\n```\n\n## Usage\n\n1. Open a storyboard or Xib file.  \n2. Drag and drop a `UITextField` to a ViewController.  \n3. In Identity Inspector, replace the class from `UITextField` to `DTTextField` and the module to `DTTextField`.  \n\n## Properties\n\n| Property name | Type | Remark |\n| ------------- |------------- | ----- |\n| errorMessage | String | Add your error message to this property|\n| errorFont | UIFont | Change font of error text |\n| errorTextColor | UIColor | Change color of error text |\n| paddingYErrorLabel | CGFloat | Error text top padding |\n| floatPlaceholderColor | UIColor | To change float placeholder color |\n| floatPlaceholderActiveColor | UIColor | To change float placeholder color while TextField is active(First responder)|\n| floatPlaceholderFont | UIFont | Change font of float placeholder |\n| paddingYFloatLabel | CGFloat | float placeholder top padding |\n| placeholderColor | UIColor | change placeholder color |\n| animateFloatPlaceholder | Bool | animate float placeholder label |\n| hideErrorWhenEditing | Bool | hide error label when typing |\n| floatingDisplayStatus | enum | maintain display status always, never, defaults | \n\n\n### Important Properties\n\n| Property name | Type | Remark |\n| ------------- |------------- | ----- |\n| dtLayer | CALayer | If you want to formate DTTextField than use dtLayer property instead of layer (e.g. background color) |\n| borderColor | UIColor | Change border color of DTTextField |\n| canShowBorder | Bool | Toggle border of DTTextField |\n| dtborderStyle | enum | none, rounded , sqare , top , bottom , left , right |\n\n## Methods\n\n| Method Name | Remark |\n| ------------|--------|\n| showError | to show error message |\n| hideError | to hide error message |\n\n## Note\n\nDon't give height constraint to DTTextField otherwise it won't work properly.\n\n## TODO\n* Add inbuilt validation\n\n## Author\n\nDhaval Thanki :sunglasses:\n\n## License\n\n```DTTextField``` is available under the MIT license. See the [LICENSE](https://github.com/iDhaval/DTTextField/blob/master/LICENSE) file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FiDhaval%2FDTTextField","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FiDhaval%2FDTTextField","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FiDhaval%2FDTTextField/lists"}