{"id":19499694,"url":"https://github.com/apsl/react-native-floating-label","last_synced_at":"2025-04-25T22:34:21.833Z","repository":{"id":57337075,"uuid":"47695987","full_name":"APSL/react-native-floating-label","owner":"APSL","description":"A React Native floating label text input for tcomb-form-native","archived":false,"fork":false,"pushed_at":"2018-04-20T11:47:15.000Z","size":106,"stargazers_count":66,"open_issues_count":8,"forks_count":12,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-10-12T23:46:15.677Z","etag":null,"topics":["react-native","tcomb","tcomb-form-native"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/APSL.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":"2015-12-09T14:24:30.000Z","updated_at":"2024-03-30T22:56:44.000Z","dependencies_parsed_at":"2022-09-12T13:42:45.989Z","dependency_job_id":null,"html_url":"https://github.com/APSL/react-native-floating-label","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/APSL%2Freact-native-floating-label","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/APSL%2Freact-native-floating-label/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/APSL%2Freact-native-floating-label/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/APSL%2Freact-native-floating-label/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/APSL","download_url":"https://codeload.github.com/APSL/react-native-floating-label/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224019605,"owners_count":17242177,"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":["react-native","tcomb","tcomb-form-native"],"created_at":"2024-11-10T22:05:50.625Z","updated_at":"2024-11-10T22:05:51.479Z","avatar_url":"https://github.com/APSL.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-floating-label\nA floating label factory to use with [``tcomb-form-native``](https://github.com/gcanti/tcomb-form-native) library.\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/wiki/alvaromb/react-native-floating-label/floating-form.gif\" alt=\"Floating label\" width=\"400\"\u003e\n\u003c/p\u003e\n\n## Install\n```\nnpm i react-native-floating-label --save\n```\n\nUse 0.2.2 for RN\u003e=0.25.\n\n## Usage\nWhen configuring your ``tcomb-form-native`` ``Form``, use the ``factory`` option to set as ``FloatingLabel``:\n\n```es6\nimport React, { View } from 'react-native'\nimport t from 'tcomb-form-native'\nimport FloatingLabel from 'react-native-floating-label'\n\nconst Form = t.form.Form\nconst Login = t.struct({\n  email: t.String,\n  password: t.String,\n})\n\nclass App extends React.Component {\n  constructor (props) {\n    super(props)\n    this.state = {\n      value: {},\n      options: {\n        fields: {\n          email: {\n            factory: FloatingLabel,\n          },\n          password: {\n            factory: FloatingLabel,\n          },\n        },\n      },\n    }\n  }\n\n  render () {\n    return (\n      \u003cView style={{flex: 1}}\u003e\n        \u003cForm ref='form'\n          type={Login}\n          value={this.state.value}\n          options={this.state.options}\n        /\u003e\n      \u003c/View\u003e\n    )\n  }\n}\n```\n\n## API\nYou can pass all the `TextInput` props, and an additional prop called `errorPlaceholderTextColor` which accepts a color `string` to change the placeholder color when a validation error occurs.\n\n## Author\nÁlvaro Medina Ballester. 2015.\n\namedina at apsl.net\n\n## License\n\nMIT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapsl%2Freact-native-floating-label","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapsl%2Freact-native-floating-label","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapsl%2Freact-native-floating-label/lists"}