{"id":17359450,"url":"https://github.com/selmi-karim/rn-searchbox","last_synced_at":"2026-05-01T01:31:33.327Z","repository":{"id":117355802,"uuid":"137282007","full_name":"selmi-karim/rn-searchbox","owner":"selmi-karim","description":"A simple Search Bar with FlatList Component for handling huge and large data.","archived":false,"fork":false,"pushed_at":"2018-06-15T16:00:37.000Z","size":4164,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-29T12:40:42.489Z","etag":null,"topics":["filter","flatlist","react-native","search","searchbar","searchbox"],"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/selmi-karim.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-13T23:24:31.000Z","updated_at":"2018-07-27T09:08:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"b91dd35e-fdf9-4854-9fc7-7f6fde3eea2d","html_url":"https://github.com/selmi-karim/rn-searchbox","commit_stats":{"total_commits":72,"total_committers":1,"mean_commits":72.0,"dds":0.0,"last_synced_commit":"490454d61e1e195476349965bd52c9b01cab985a"},"previous_names":["karimation/rn-searchbox"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/selmi-karim/rn-searchbox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selmi-karim%2Frn-searchbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selmi-karim%2Frn-searchbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selmi-karim%2Frn-searchbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selmi-karim%2Frn-searchbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/selmi-karim","download_url":"https://codeload.github.com/selmi-karim/rn-searchbox/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selmi-karim%2Frn-searchbox/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32482460,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["filter","flatlist","react-native","search","searchbar","searchbox"],"created_at":"2024-10-15T19:09:40.113Z","updated_at":"2026-05-01T01:31:33.300Z","avatar_url":"https://github.com/selmi-karim.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# rn-searchbox\n\nA simple Search Bar with \u003ca href=\"https://facebook.github.io/react-native/docs/flatlist.html\"\u003eFlatlist Component\u003c/a\u003e for handling huge and large data.\n\nWith simple search capability which can be utilised by handing the component data to \u003ca href=\"https://facebook.github.io/react-native/docs/flatlist.html\"\u003eFlatlist Component\u003c/a\u003e and providing a onClick function which will receive the item selected of the data array.\n\nThe search function uses a  \u003ca href=\"https://npmjs.com/package/dice-similarity-coeff\"\u003eDice Algorithm\u003c/a\u003e to traverse the data and looks for an indexOf the user input within all strings, numbers, and boolean values in the data.\n\nBuild for React Native App and works on both Android and iOS.\n\n\u003cp align=\"center\"\u003e \n\u003cimg src=\"screenshots/test.gif\" height= \"500\" width=\"350\" \u003e\n\u003c/p\u003e\n\n\n# Install\n\n```\nnpm install --save rn-searchbox\n\nor\n\nyarn add rn-searchbox\n\n```\n\n# Component props\n\n\nProperty\t|\tType\t\t|\tDefault\t\t|\tDescription |\n:---------|:--------|:----------|:------------|\nonClick(item) | function | `null` | Fires after each Click and return item data.\nitemsStyles | array | `[]` | The array of styles of data to be displayed in FlatList.\ndata\t|\tarray\t|\t`[]` required*\t|\tThe array of data to be searched\nplaceholder\t|\tstring\t|\t`Search`\t|\tThe placeholder for the search bar.\nonFocus | function | `null` | Fires when the search bar receives focus.\nonBlur | function | `null` | Fires when the search bar loses focus.\ncloseButton | Component | MaterialIcon | Sets the close button component.\ncloseButtonAccessibilityLabel | string | `Clear search text` | Accessibility label for the close button.\nheightAdjust | number | `0` | Adjust the height of the search bar.\nbackgroundColor | string | `white` | The background colour of the search bar.\niconColor | string | `gray` | The color of the back and X icons.\ntextColor | string | `gray` | The color of the search bar text.\nselectionColor | string | `lightskyblue` | The color of the the search bar cursor and text selection.\nplaceholderTextColor | string | `lightgray` | The color of the placeholder text.\nshowOnLoad | boolean | `false` | Show the search bar when it is first rendered.\nclearOnShow | boolean | `false` | Clear input when the search bar is shown.\nclearOnHide | boolean | `true` | Clear input when the search bar is hidden.\nclearOnBlur | boolean | `false` | Clear input when the search bar is blurred.\nfocusOnLayout | boolean | `true` | Focus the text input box whenever it is shown.\nautoCorrect | boolean | `true` | AutoCorrect the search bar text.\nautoCapitalize | string | `sentences` | Auto capitialize behaviour of the text input - enum('none', 'sentences', 'words', 'characters')\nkeyboardAppearance | string | 'default' | Determines the color of the keyboard.\nfontFamily | string | `System` | The font family to be used.\nfontSize | number | 20 | Sets the font size.\n\n\n\n# Usage\n\n```jsx\nimport React, { Component } from 'react' \nimport { StyleSheet, Alert } from 'react-native' \nimport SearchBox from 'rn-searchbox' \n\nexport default class Example extends Component {\n    \n    onClick(item) {\n        Alert.alert('Item: '+JSON.stringify(item)) \n    }\n    render() {\n        return (\n            \u003cSearchBox\n                data={data.users}\n                showOnLoad\n                onClick={(item) =\u003e this.onClick(item)}\n                itemsStyles={itemsStyle()}\n            /\u003e\n        ) \n    }\n}\n\nconst itemsStyle = () =\u003e {\n    return {\n        name: {\n            fontSize: 18\n        },\n        email: {\n            color: 'red'\n        },\n        phone: {\n            fontSize: 16,\n            color: 'blue'\n        }\n    }\n}\n\nconst data = {\n    \"users\":\n        [\n            {\n                \"key\": \"0\",\n                \"name\": \"Proxima Midnight\",\n                \"phone\": \"+216 54 548 216\"\n            },\n            {\n                \"key\": \"1\",\n                \"name\": \"Ebony Maw\",\n                \"email\": \"ebony@appdividend.com\",\n            },\n            {\n                \"key\": \"2\",\n                \"name\": \"Black Dwarf\",\n            },\n            {\n                \"key\": \"3\",\n                \"name\": \"Mad Titan\",\n                \"email\": \"thanos@appdividend.com\",\n                \"phone\": \"+216 54 548 100\",\n                \"adress\": \"Sousse, Tunis\"\n            },\n            {...}\n        ]\n}\n\n\n```\n\n\n\n# Next Step:\n\n*  Possibility to add a custom icon/image to the ListView\n*  New Algorithm for String Matching\n*  Update docs for Box component\n*  Update react, react-native \u0026 other dependencies\n\n# Questions?\n\nFeel free to contact \u003ca href=\"http://www.karimation.com\"\u003eme\u003c/a\u003e or create an issue.\n\n# Author\n\nkerim selmi \u003ca href=\"http://www.karimation.com\"\u003ekarimation\u003c/a\u003e\n\n# License\n\nThis project is licensed under the  \u003ca href=\"LICENSE\"\u003eMIT License\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fselmi-karim%2Frn-searchbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fselmi-karim%2Frn-searchbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fselmi-karim%2Frn-searchbox/lists"}