{"id":18852149,"url":"https://github.com/infeng/react-viewer-mobile","last_synced_at":"2025-04-14T09:53:35.306Z","repository":{"id":52162860,"uuid":"81037048","full_name":"infeng/react-viewer-mobile","owner":"infeng","description":"react image viewer for mobile https://infeng.github.io/react-viewer-mobile/","archived":false,"fork":false,"pushed_at":"2022-11-02T18:33:47.000Z","size":1807,"stargazers_count":13,"open_issues_count":5,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T23:12:22.355Z","etag":null,"topics":["gallery","image","react"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/infeng.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-02-06T01:48:35.000Z","updated_at":"2024-01-11T06:11:52.000Z","dependencies_parsed_at":"2022-08-22T23:10:28.816Z","dependency_job_id":null,"html_url":"https://github.com/infeng/react-viewer-mobile","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infeng%2Freact-viewer-mobile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infeng%2Freact-viewer-mobile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infeng%2Freact-viewer-mobile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infeng%2Freact-viewer-mobile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/infeng","download_url":"https://codeload.github.com/infeng/react-viewer-mobile/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248860357,"owners_count":21173339,"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":["gallery","image","react"],"created_at":"2024-11-08T03:38:18.957Z","updated_at":"2025-04-14T09:53:35.272Z","avatar_url":"https://github.com/infeng.png","language":"TypeScript","readme":"# react-viewer-mobile\n\nreact image viewer for mobile\n\n## Introduction\n\n[react-viewer](https://github.com/infeng/react-viewer) for mobile.\n\n## Installation\n\n```bash\nnpm install react-viewer-mobile --save\n```\n\n## Usage\n\n```javascript\nimport * as React from 'react';\nimport Viewer from 'react-viewer-mobile';\nimport 'react-viewer-mobile/dist/index.css';\n\nclass App extends React.Component\u003cany, any\u003e {\n  constructor() {\n    super();\n\n    this.state = {\n      visible: false,\n    };\n  }\n\n  render() {\n    return (\n      \u003cdiv\u003e\n        \u003cbutton onClick={() =\u003e { this.setState({ visible: !this.state.visible }); } }\u003eshow\u003c/button\u003e\n        \u003cViewer\n        visible={this.state.visible}\n        images={[{src: '', alt: ''}]}\n        /\u003e\n      \u003c/div\u003e\n    );\n  }\n}\n```\n\n## Props\n\n| props       | type         | default | description                 | required |\n|-------------|--------------|---------|-----------------------------|----------|\n| visible     | string       |  false  | Viewer visible             | true |\n| images      | {src: string, alt: string}[]     | []      | image source array | true  |\n| activeIndex | number       | 0       | active image index | false |\n| zIndex      | number       | 1000    | Viewer css z-index | false |\n\n## Gesture support\n\n- slide\n- pinch\n\n\n## License\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfeng%2Freact-viewer-mobile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finfeng%2Freact-viewer-mobile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfeng%2Freact-viewer-mobile/lists"}