{"id":19928082,"url":"https://github.com/razorrun/react-native-material-textfield-smartlife","last_synced_at":"2026-06-22T02:31:54.329Z","repository":{"id":57338285,"uuid":"297462022","full_name":"razorRun/react-native-material-textfield-smartlife","owner":"razorRun","description":"React native Material text field with consistent behaviour on iOS and Android","archived":false,"fork":false,"pushed_at":"2020-09-27T20:08:38.000Z","size":558,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-30T06:29:06.163Z","etag":null,"topics":["and","ios","material-ui","matieral-design","react-native","textfeld"],"latest_commit_sha":null,"homepage":"https://roshan.digital/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/razorRun.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-21T21:10:35.000Z","updated_at":"2020-09-27T20:08:40.000Z","dependencies_parsed_at":"2022-08-31T03:51:37.787Z","dependency_job_id":null,"html_url":"https://github.com/razorRun/react-native-material-textfield-smartlife","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/razorRun/react-native-material-textfield-smartlife","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razorRun%2Freact-native-material-textfield-smartlife","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razorRun%2Freact-native-material-textfield-smartlife/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razorRun%2Freact-native-material-textfield-smartlife/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razorRun%2Freact-native-material-textfield-smartlife/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/razorRun","download_url":"https://codeload.github.com/razorRun/react-native-material-textfield-smartlife/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razorRun%2Freact-native-material-textfield-smartlife/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269799505,"owners_count":24477643,"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-10T02:00:08.965Z","response_time":71,"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":["and","ios","material-ui","matieral-design","react-native","textfeld"],"created_at":"2024-11-12T22:36:13.245Z","updated_at":"2026-06-22T02:31:54.297Z","avatar_url":"https://github.com/razorRun.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"A `\u003cTextField\u003e` component for react-native projects was initially cloned from [`react-native-material-textfield`](https://github.com/n4kz/react-native-material-textfield#readme) And been actively maintaining it as we wanted to avoid any future changes to original repo that effects our existing applications. \n\n# react-native-material-textfield-smartlife\n\nMaterial texfield with consistent behaviour on iOS and Android\n\n## Features\n\n* Material design [guidelines][md-textfield] compliance\n* Consistent look and feel on iOS and Android\n* Animated state transitions (normal, focused and errored)\n* Customizable font size, colors and animation duration\n* Disabled state (with dotted underline)\n* Outlined and filled fields\n* Masked input support\n* Multiline text input\n* Character counter\n* Prefix and suffix\n* Accessory views\n* Helper text\n* RTL support\n* Pure javascript implementation\n\n## Installation\n\n```bash\nnpm install --save react-native-material-textfield-smartlife\n```\n\n## Usage\n\n```javascript\nimport React, { Component } from 'react';\nimport {\n  TextField,\n  FilledTextField,\n  OutlinedTextField,\n} from 'react-native-material-textfield-smartlife';\n\nclass Example extends Component {\n  fieldRef = React.createRef();\n\n  onSubmit = () =\u003e {\n    let { current: field } = this.fieldRef;\n\n    console.log(field.value());\n  };\n\n  formatText = (text) =\u003e {\n    return text.replace(/[^+\\d]/g, '');\n  };\n\n  render() {\n    return (\n      \u003cOutlinedTextField\n        label='Phone number'\n        keyboardType='phone-pad'\n        formatText={this.formatText}\n        onSubmitEditing={this.onSubmit}\n        ref={this.fieldRef}\n      /\u003e\n    );\n  }\n}\n```\n\n## Properties\n\n name                  | description                                 | type     | default\n:--------------------- |:------------------------------------------- | --------:|:------------------\n textColor             | Text input color                            |   String | rgba(0, 0, 0, .87)\n fontSize              | Text input font size                        |   Number | 16\n labelFontSize         | Text field label font size                  |   Number | 12\n lineWidth             | Text field underline width                  |   Number | 0.5\n activeLineWidth       | Text field active underline width           |   Number | 2\n disabledLineWidth     | Text field disabled underline width         |   Number | 1\n tintColor             | Text field accent color                     |   String | rgb(0, 145, 234)\n baseColor             | Text field base color                       |   String | rgba(0, 0, 0, .38)\n label                 | Text field label text                       |   String | -\n title                 | Text field helper text                      |   String | -\n prefix                | Text field prefix text                      |   String | -\n suffix                | Text field suffix text                      |   String | -\n error                 | Text field error text                       |   String | -\n errorColor            | Text field color for errored state          |   String | rgb(213, 0, 0)\n lineType              | Text field line type                        |   String | solid\n disabledLineType      | Text field line type in disabled state      |   String | dotted\n animationDuration     | Text field animation duration in ms         |   Number | 225\n characterRestriction  | Text field soft limit for character counter |   Number | -\n disabled              | Text field availability                     |  Boolean | false\n editable              | Text field text can be edited               |  Boolean | true\n multiline             | Text filed multiline input                  |  Boolean | false\n contentInset          | Layout configuration object                 |   Object | [{...}](#content-inset)\n labelOffset           | Label position adjustment                   |   Object | [{...}](#label-offset)\n inputContainerStyle   | Style for input container view              |   Object | -\n containerStyle        | Style for container view                    |   Object | -\n labelTextStyle        | Style for label inner Text component        |   Object | -\n titleTextStyle        | Style for title inner Text component        |   Object | -\n affixTextStyle        | Style for affix inner Text component        |   Object | -\n formatText            | Input mask callback                         | Function | -\n renderLeftAccessory   | Render left input accessory view            | Function | -\n renderRightAccessory  | Render right input accessory view           | Function | -\n onChangeText          | Change text callback                        | Function | -\n onFocus               | Focus callback                              | Function | -\n onBlur                | Blur callback                               | Function | -\n\nOther [TextInput][rn-textinput] properties will also work.\n\n### Content Inset\n\n name  | description                       | Normal | Filled | Outlined\n:----- |:--------------------------------- | ------:| ------:| --------:\n top   | Inset on the top side             |     16 |      8 |        0\n left  | Inset on the left side            |      0 |     12 |       12\n right | Inset on the right side           |      0 |     12 |       12\n label | Space between label and TextInput |      4 |      4 |        4\n input | Space between line and TextInput  |      8 |      8 |       16\n\n### Label Offset\n\n name | description                          | Normal | Filled | Outlined\n:---- |:------------------------------------ | ------:| ------:| --------:\n x0   | Horizontal offset for inactive state |      0 |      0 |        0\n y0   | Vertical offset for inactive state   |      0 |    -10 |        0 \n x1   | Horizontal offset for active state   |      0 |      0 |        0\n y1   | Vertical offset for active state     |      0 |     -2 |      -10\n\n## Methods\n\n name                   | description                   | returns\n:---------------------- |:----------------------------- | -------:\n focus()                | Acquire focus                 |       -\n blur()                 | Release focus                 |       -\n clear()                | Clear text field              |       -\n value()                | Get current value             |  String\n isFocused()            | Get current focus state       | Boolean\n isErrored()            | Get current error state       | Boolean\n isRestricted()         | Get current restriction state | Boolean\n isDefaultVisible()     | Get default value visibility  | Boolean\n isPlaceholderVisible() | Get placeholder visibility    | Boolean\n setValue()             | Set current value             |       -\n\n## Example\n\n```bash\ngit clone https://github.com/razorRun/react-native-material-textfield-smartlife\ncd react-native-material-textfield-smartlife/example\nnpm install\nnpm run ios # or npm run android\n```\n\n## Copyright and License\n\nBSD License\n\nCopyright 2017-2019 Alexander Nazarov. All rights reserved.\n\n### credits\n[n4kz](https://github.com/n4kz/react-native-material-textfield#readme)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frazorrun%2Freact-native-material-textfield-smartlife","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frazorrun%2Freact-native-material-textfield-smartlife","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frazorrun%2Freact-native-material-textfield-smartlife/lists"}