{"id":38601241,"url":"https://github.com/darioajr/react-native-image-listitem","last_synced_at":"2026-01-17T08:33:55.272Z","repository":{"id":33731164,"uuid":"161077726","full_name":"darioajr/react-native-image-listitem","owner":"darioajr","description":null,"archived":false,"fork":false,"pushed_at":"2025-11-26T22:16:34.000Z","size":1219,"stargazers_count":2,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-24T10:57:29.708Z","etag":null,"topics":["react","react-native"],"latest_commit_sha":null,"homepage":null,"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/darioajr.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null}},"created_at":"2018-12-09T20:18:28.000Z","updated_at":"2025-08-20T14:56:36.000Z","dependencies_parsed_at":"2025-04-23T03:15:29.457Z","dependency_job_id":null,"html_url":"https://github.com/darioajr/react-native-image-listitem","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/darioajr/react-native-image-listitem","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darioajr%2Freact-native-image-listitem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darioajr%2Freact-native-image-listitem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darioajr%2Freact-native-image-listitem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darioajr%2Freact-native-image-listitem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/darioajr","download_url":"https://codeload.github.com/darioajr/react-native-image-listitem/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darioajr%2Freact-native-image-listitem/sbom","scorecard":{"id":322500,"data":{"date":"2025-08-11","repo":{"name":"github.com/darioajr/react-native-image-listitem","commit":"9037dfdd450ba8cb61a146aed22faec5eaad72d5"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/22 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: topLevel 'contents' permission set to 'write': .github/workflows/build.yml:9","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/darioajr/react-native-image-listitem/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/darioajr/react-native-image-listitem/build.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 8 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"20 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-xffm-g5w8-qvg7","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-m5qc-5hw7-8vg7","Warn: Project is vulnerable to: GHSA-6c8f-qphg-qjgp","Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T01:43:21.334Z","repository_id":33731164,"created_at":"2025-08-18T01:43:21.334Z","updated_at":"2025-08-18T01:43:21.334Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28504364,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T06:57:29.758Z","status":"ssl_error","status_checked_at":"2026-01-17T06:56:03.931Z","response_time":85,"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":["react","react-native"],"created_at":"2026-01-17T08:33:54.540Z","updated_at":"2026-01-17T08:33:55.264Z","avatar_url":"https://github.com/darioajr.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-image-listitem \n\n[![NPM Version](https://img.shields.io/npm/v/react-native-image-listitem)](https://www.npmjs.com/package/react-native-image-listitem) [![Build Status](https://img.shields.io/github/actions/workflow/status/darioajr/react-native-image-listitem/build.yml)](https://github.com/darioajr/react-native-image-listitem/actions)\n\n\n*ListItem gallery for images in React Native*\n\n\n## Installation\n\n```\nyarn add react-native-image-listitem\n```\n\n## Usage\n\n```js\nimport Image from 'react-native-image-listitem';\n\n\u003cImageListItem\n  id={index}\n  onPressItem={this.onPressItem}\n  uri={item.image.uri}\n  selected={item.selected}\n/\u003e\n```\n\n## Properties\n\nAny [`Image` property](http://facebook.github.io/react-native/docs/image.html) and the following:\n\n| Prop | Description | Default |\n|---|---|---|\n|**`styles`**|Styles applied to the inner image component.|*None*|\n|**`id`**|id of the component.|*None*|\n|**`uri`**|uri of the component.|*None*|\n|**`selected`**|Enumerate selected images|*None*|\n\n## Demo\n\n![simulator_screen_shot_-_iphone_x_-_2018-12-09_at_21 45 02_25](https://user-images.githubusercontent.com/7606/49704941-79e43a80-fc00-11e8-8e75-afcce34e560e.png)\n\n## Example \n\nCheck full example in the `Example` folder. \n\n### ImagePicker with ImageListItem (Gallery)\n\n```js\nimport React from 'react'\nimport { StyleSheet, View, Image, PixelRatio, FlatList, Text, TouchableOpacity, AsyncStorage, Dimensions } from 'react-native'\nimport { Button, ListItem } from 'react-native-elements'\n\nimport ImagePicker from 'react-native-image-picker'\nimport ImageListItem from 'react-native-image-listitem'\n\nconst options = {\n  title: 'Select Avatar',\n  storageOptions: {\n    skipBackup: true,\n    path: 'images'\n  }\n}\n\nclass MainScreen extends React.Component {\n  \n  constructor (props) {\n    super(props);\n    this.state={\n      selectedImage: null,\n      dataSource: []\n    }\n    \n    this.selectPhotoTapped = this.selectPhotoTapped.bind(this)\n    this.renderRow = this.renderRow.bind(this)\n    this.onPressItem = this.onPressItem.bind(this)\n  }\n\n  componentWillMount() {\n    try {\n      AsyncStorage.getItem(\"ImageArray\", (err, result) =\u003e {\n        if (err === null \u0026\u0026 result !== null) {\n          dataSource = JSON.parse(result)       \n          this.setState({\n            dataSource: dataSource\n          })\n        }\n      })\n    } catch (err) {\n      console.warn(err)\n    }\n  }\n\n  selectPhotoTapped() {\n    ImagePicker.showImagePicker(options, (response) =\u003e {\n\n      if (response.error) {\n        console.warn('ImagePicker Error: ', response.error)\n      } else {\n        let source = {\n          image: {uri: response.uri},\n          selected: false\n        }\n\n        // You can also display the image using data:\n        // let source = { uri: 'data:image/jpeg;base64,' + response.data };\n        if (this.state.selectedImage === null) {\n          this.state.selectedImage = source.image\n        }\n\n        this.state.dataSource.push(source)\n\n        this.setState({\n          selectedIndex:this.state.selectedIndex\n        })\n\n        try {\n          AsyncStorage.setItem(\"ImageArray\", JSON.stringify(this.state.dataSource))\n        } catch(err) {\n          console.warn(err)\n        }\n      }\n    })\n  }\n\n  deleteSelectedImage() {\n    newDataSource = [];\n    this.state.dataSource.forEach(element =\u003e {\n      if (!element.selected) {\n        newDataSource.push(element)\n      }\n    })\n\n    this.setState({\n      dataSource: newDataSource\n    })\n\n    try {\n      AsyncStorage.setItem(\"ImageArray\", JSON.stringify(newDataSource))\n    } catch(err) {\n      console.warn(err)\n    }\n  }\n\n  uploadImages() {\n    console.warn('not implemented.')\n  }\n\n  selectPhotoTapped() {\n    ImagePicker.showImagePicker(options, (response) =\u003e {\n\n      if (response.error) {\n        console.warn('ImagePicker Error: ', response.error)\n      } else {\n        let source = {\n          image: {uri: response.uri},\n          selected: false\n        }\n\n        // You can also display the image using data:\n        // let source = { uri: 'data:image/jpeg;base64,' + response.data };\n        if (this.state.selectedImage === null) {\n          this.state.selectedImage = source.image\n        }\n\n        this.state.dataSource.push(source)\n\n        this.setState({\n          selectedIndex:this.state.selectedIndex\n        })\n\n        try {\n          AsyncStorage.setItem(\"ImageArray\", JSON.stringify(this.state.dataSource))\n        } catch(err) {\n          console.warn(err);\n        }\n      }\n    })\n  }\n\n  onPressItem = (index) =\u003e {\n    this.state.dataSource[index].selected = !this.state.dataSource[index].selected;\n    \n    this.setState({\n      dataSource:this.state.dataSource,\n      selectedImage:this.state.dataSource[index].image\n    })\n  }\n\n  renderRow = ({item, index}) =\u003e (\n    \u003cImageListItem\n      id={index}\n      onPressItem={this.onPressItem}\n      uri={item.image.uri}\n      selected={item.selected}\n    /\u003e\n  )\n\n  keyExtractor = (item, index) =\u003e `${index}`\n\n  render() {\n    return (\n      \u003cView style={styles.container}\u003e\n        \u003cView style={styles.topbar}\u003e\n          \u003cButton title='Upload' onPress={this.uploadImages.bind(this)} /\u003e\n          \u003cButton title='Delete' onPress={this.deleteSelectedImage.bind(this)} /\u003e\n        \u003c/View\u003e\n        \u003cView style={styles.content}\u003e\n          \u003cImage style={styles.image} source={this.state.selectedImage} /\u003e\n        \u003c/View\u003e\n        \u003cView style={styles.bottombar}\u003e\n          \u003cFlatList\n            style={styles.imageArray}\n            horizontal={true}\n            keyExtractor={this.keyExtractor}\n            data={this.state.dataSource}\n            extraData={this.state}\n            renderItem={this.renderRow}\n          /\u003e\n          \n          \u003cTouchableOpacity\n            style={styles.newButton}\n            onPress={this.selectPhotoTapped.bind(this)}\u003e\n            \u003cText\u003eNew\u003c/Text\u003e\n          \u003c/TouchableOpacity\u003e\n        \u003c/View\u003e\n      \u003c/View\u003e\n    )\n  }\n}\n\nMainScreen.navigationOptions = {\n  header: null\n}\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    backgroundColor: '#F5FCFF',\n    flexDirection: 'column',\n    justifyContent: 'space-between',\n    alignItems: 'center'\n  },\n  topbar: {\n    flexDirection: 'row'\n  },\n  content: {\n    flex: 1,\n    width: '100%',\n    alignSelf: 'stretch',\n  },\n  bottombar: {\n    width: '100%',\n    height: 80,\n  },\n  image: {\n    width: '100%',\n    height: '100%'\n  },\n  imageArray: {\n    position: 'absolute',\n    marginLeft: 80,\n    height: 80,\n    marginRight: 0\n  },\n  newButton: {\n    width: 80,\n    height: 80,\n    alignItems: 'center',\n    justifyContent: 'center',\n    borderColor: 'grey',\n    backgroundColor: 'white',\n    borderWidth: 1\n  }\n})\n\nexport default MainScreen\n```\n\n## License\n\n[MIT License](http://opensource.org/licenses/mit-license.html). © Dario Alves Junior\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarioajr%2Freact-native-image-listitem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarioajr%2Freact-native-image-listitem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarioajr%2Freact-native-image-listitem/lists"}