{"id":4064,"url":"https://github.com/naoufal/react-native-progress-hud","last_synced_at":"2025-04-06T02:12:29.079Z","repository":{"id":30073208,"uuid":"33622712","full_name":"naoufal/react-native-progress-hud","owner":"naoufal","description":"A clean and lightweight progress HUD for your React Native app.","archived":false,"fork":false,"pushed_at":"2017-10-16T07:35:19.000Z","size":44,"stargazers_count":258,"open_issues_count":13,"forks_count":54,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-30T01:09:13.412Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/react-native-progress-hud","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/naoufal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-08T17:51:29.000Z","updated_at":"2024-04-30T07:41:21.000Z","dependencies_parsed_at":"2022-07-14T11:30:33.220Z","dependency_job_id":null,"html_url":"https://github.com/naoufal/react-native-progress-hud","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naoufal%2Freact-native-progress-hud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naoufal%2Freact-native-progress-hud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naoufal%2Freact-native-progress-hud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naoufal%2Freact-native-progress-hud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/naoufal","download_url":"https://codeload.github.com/naoufal/react-native-progress-hud/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247423516,"owners_count":20936626,"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":"2024-01-05T20:16:59.980Z","updated_at":"2025-04-06T02:12:29.061Z","avatar_url":"https://github.com/naoufal.png","language":"JavaScript","funding_links":[],"categories":["Components","组件","Libraries","Others"],"sub_categories":["UI"],"readme":"# React Native Progress HUD\n[![npm](https://img.shields.io/npm/v/react-native-progress-hud.svg?style=flat-square)](https://www.npmjs.com/package/react-native-progress-hud)\n[![npm downloads](https://img.shields.io/npm/dm/react-native-progress-hud.svg?style=flat-square)](https://www.npmjs.com/package/react-native-progress-hud)\n[![Travis](https://img.shields.io/travis/naoufal/react-native-progress-hud/master.svg?style=flat-square)](https://travis-ci.org/naoufal/react-native-progress-hu://travis-ci.org/naoufal/react-native-progress-hud)\n[![Code Climate](https://img.shields.io/codeclimate/github/naoufal/react-native-progress-hud.svg?style=flat-square)](https://codeclimate.com/github/naoufal/react-native-progress-hud)\n\nReact Native Progress HUD is a [React Native](https://facebook.github.io/react-native/) port of the popular [`SVProgressHUD`](https://github.com/TransitApp/SVProgressHUD).  It is a clean and easy-to-use HUD meant to display the progress of an ongoing task.\n\nAre you using [React](https://facebook.github.io/react/)?  Check out [React Progress HUD](https://github.com/naoufal/react-progress-hud).\n\n![progress-hud-screen](https://cloud.githubusercontent.com/assets/1627824/7716549/94f15754-fe61-11e4-9a59-358d460197f2.gif)\n\n## Install\n```shell\nnpm i --save react-native-progress-hud\n```\n\n## Usage\nUsing the HUD in your app will usually look like this:\n```js\nvar ProgressHUD = require('react-native-progress-hud');\n\nvar YourComponent = React.createClass({\n  mixins: [ProgressHUD.Mixin],\n\n  ...\n\n  render() {\n    return (\n      \u003cView\u003e\n        ...\n        \u003cProgressHUD\n          isVisible={this.state.is_hud_visible}\n          isDismissible={true}\n          overlayColor=\"rgba(0, 0, 0, 0.11)\"\n        /\u003e\n      \u003c/View\u003e\n    );\n  }\n```\n\n### Showing the HUD\nYou can display the HUD by calling:\n```js\n  this.showProgressHUD();\n```\n\n### Dismissing the HUD\nIt can be dismissed by calling:\n```js\n  this.dismissProgressHUD();\n```\n\n### Child Components\nFrom time to time, you may need to show the HUD from the a child component.  Using the HUD from a child component will look like this:\n\n```js\nvar YourChildComponent = React.createClass({\n  render() {\n    contextTypes: {\n      showProgressHUD: React.PropTypes.func,\n      dismissProgressHUD: React.PropTypes.func\n    },\n\n    return (\n      \u003cView\u003e\n        ...\n        \u003cTouchableHighlight\n          onPress={this.context.showProgressHUD}\n        \u003e\n          Show Progress HUD\n        \u003c/TouchableHighlight\u003e\n      \u003c/View\u003e\n    );\n  }\n```\n\n## Props\nThe following props can be used to modify the HUD's style and/or behaviour:\n\n| Prop | Type | Opt/Required | Default | Note |\n|---|---|---|---|---|\n|__`isVisible`__|_Boolean_|Required|`N/A`|Displays the HUD when set to true.\n|__`isDismissible`__|_Boolean_|Optional|`false`|When set to true, the HUD is dismissed on user interaction.\n|__`overlayColor`__|_String_|Optional|`rgba(0, 0, 0, 0)`|Sets the color of the overlay.\n|__`color`__|_String_|Optional|`#000`|Sets the color of the spinner.\n\n## License\nCopyright (c) 2015, [Naoufal Kadhom](http://naoufal.com)\n\nPermission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaoufal%2Freact-native-progress-hud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnaoufal%2Freact-native-progress-hud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaoufal%2Freact-native-progress-hud/lists"}