{"id":28408470,"url":"https://github.com/elemefe/react-native-smart-gesture","last_synced_at":"2025-06-30T02:32:50.422Z","repository":{"id":57340198,"uuid":"72277887","full_name":"ElemeFE/react-native-smart-gesture","owner":"ElemeFE","description":"smart-gesture for react-native. ","archived":false,"fork":false,"pushed_at":"2016-11-01T11:15:56.000Z","size":331,"stargazers_count":24,"open_issues_count":0,"forks_count":5,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-06-09T02:29:11.130Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ElemeFE.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING_en-us.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-29T10:11:43.000Z","updated_at":"2023-06-21T07:18:07.000Z","dependencies_parsed_at":"2022-08-26T04:30:52.196Z","dependency_job_id":null,"html_url":"https://github.com/ElemeFE/react-native-smart-gesture","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ElemeFE/react-native-smart-gesture","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElemeFE%2Freact-native-smart-gesture","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElemeFE%2Freact-native-smart-gesture/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElemeFE%2Freact-native-smart-gesture/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElemeFE%2Freact-native-smart-gesture/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ElemeFE","download_url":"https://codeload.github.com/ElemeFE/react-native-smart-gesture/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElemeFE%2Freact-native-smart-gesture/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262698943,"owners_count":23350206,"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":[],"created_at":"2025-06-02T03:37:23.052Z","updated_at":"2025-06-30T02:32:50.410Z","avatar_url":"https://github.com/ElemeFE.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-smart-gesture\nThis realization of [smart-gesture](https://github.com/ElemeFE/smart-gesture) for React Native。\n\n## 添加依赖\n\u003e Android默认就包含ART库，IOS需要单独添加依赖库。\n\n[操作步骤](./doc/dependency.md)\n\n## 安装\n```bash\nnpm install -S react-native-smart-gesture\n```\n\n## 使用方法\n作为独立的组件使用，也可以作为父容器来使用：\n```jsx\n// index.ios.js\n\nimport React from 'react';\nimport { AppRegistry, View, Text } from 'react-native';\nimport SmartGesture from 'react-native-smart-gesture';\n\nclass App extends React.Component {\n  constructor() {\n    super();\n    this.state = {\n      result: null,\n    };\n  }\n\n  _onGesture(result) {\n    this.setState({ result });\n  }\n\n  render() {\n    return (\n      \u003cView\u003e\n        \u003cSmartGesture onGesture={this._onGesture.bind(this)} /\u003e\n        \u003cText\u003e{JSON.stringify(this.state.result)}\u003c/Text\u003e\n      \u003c/View\u003e\n    );\n  }\n}\n\nAppRegistry.registerComponent('AwesomeProject', () =\u003e App);\n```\n\n[更多示例](./example)\n\n## 说明\n- android 上使用 `SmartGesture` , 必须把 `SmartGesture` 组件放在该页面的根元素内。[详细](./doc/android.md)。\n- `SmartGesture` 组件默认宽度为父组件的宽度。\n\n## props\n属性的说明请参考：[smart-gesture](https://github.com/ElemeFE/smart-gesture#configuration)\n\nname       | type     | default\n-----------|----------|----\nenablePath | Boolean  | true\nlineColor  | String   | #666\nlineWidth  | Number   | 4\ngestures   | Array    | -\nonSwipe    | Function | -\nonGesture  | Function | -\n\n## Contribution\n\n请在提交 PR 前阅读我们的[贡献指南](./.github/CONTRIBUTING_zh-cn.md)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felemefe%2Freact-native-smart-gesture","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felemefe%2Freact-native-smart-gesture","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felemefe%2Freact-native-smart-gesture/lists"}