All Projects → netyouli → react-native-whc-loading

netyouli / react-native-whc-loading

Licence: MIT license
A react native module to show loading ui, it works on iOS and Android.

Programming Languages

javascript
184084 projects - #8 most used programming language
objective c
16641 projects - #2 most used programming language
python
139335 projects - #7 most used programming language
java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to react-native-whc-loading

Vue Ui For Pc
基于Vue2.x的一套PC端UI组件,包括了Carousel 跑马灯、Cascader 级联、Checkbox 多选框、Collapse 折叠面板、DatePicker 日期选择、Dialog 对话框、Form 表单、Input 输入框、InputNumber 数字输入框、Layer 弹窗层、Loading 加载、Menu 菜单、Page 分页、Progress 进度条、Radio 单选框、SelectDropDown 仿select、Switch 开关、Table 表格、Tabs 标签页、Textarea 文本框、Tooltip 文字提示、BackTop 返回顶部、steps 步骤条、Transfer 穿梭框、Tree 树形、Upload 文件上传、Lazy 图片懒加载、Loading 加载、Pagination 分页等等
Stars: ✭ 156 (+387.5%)
Mutual labels:  loading
Statefulviewcontroller
Placeholder views based on content, loading, error or empty states
Stars: ✭ 2,139 (+6584.38%)
Mutual labels:  loading
Vue Element Loading
⏳ Loading inside a container or full screen for Vue.js
Stars: ✭ 234 (+631.25%)
Mutual labels:  loading
Notiflix
Notiflix is a JavaScript library for client-side non-blocking notifications, popup boxes, loading indicators, and more that makes your web projects much better.
Stars: ✭ 172 (+437.5%)
Mutual labels:  loading
Loadingbar
极简使用的解耦Loading组件 - http://blog.csdn.net/aa464971/article/details/70197394
Stars: ✭ 179 (+459.38%)
Mutual labels:  loading
React Native Animated Spinkit
A collection of loading indicators for React Native
Stars: ✭ 186 (+481.25%)
Mutual labels:  loading
Vue Full Loading
Full overlay loading with spinner for Vue
Stars: ✭ 148 (+362.5%)
Mutual labels:  loading
Spinners React
Lightweight SVG/CSS spinners for React
Stars: ✭ 254 (+693.75%)
Mutual labels:  loading
Tfpopup
🚀🚀🚀TFPopup不生产弹框,它只是弹框的弹出工🚀🚀🚀默认支持多种动画方式一行调用,支持完全自定义动画.
Stars: ✭ 182 (+468.75%)
Mutual labels:  loading
Vue Content Loader
SVG component to create placeholder loading, like Facebook cards loading.
Stars: ✭ 2,790 (+8618.75%)
Mutual labels:  loading
React Nprogress
⌛️ A React primitive for building slim progress bars.
Stars: ✭ 173 (+440.63%)
Mutual labels:  loading
Discovery
Discoveries on Sustainable Loading research
Stars: ✭ 174 (+443.75%)
Mutual labels:  loading
Demoloadview
切换加载中,加载失败,加载成功布局,定义一个LoadViewHelper所有界面通用,通同时也支持单个自定义无需添加布局中view, 大大降低耦合性
Stars: ✭ 218 (+581.25%)
Mutual labels:  loading
Hgplaceholders
Nice library to show placeholders and Empty States for any UITableView/UICollectionView in your project
Stars: ✭ 2,048 (+6300%)
Mutual labels:  loading
React Awesome Spinners
Awesome spinners for React 👋 ⚛ Built with styled-components 💅
Stars: ✭ 237 (+640.63%)
Mutual labels:  loading
Vue Wait
Complex Loader and Progress Management for Vue/Vuex and Nuxt Applications
Stars: ✭ 1,869 (+5740.63%)
Mutual labels:  loading
Flutter spinkit
✨ A collection of loading indicators animated with flutter. Heavily Inspired by http://tobiasahlin.com/spinkit.
Stars: ✭ 2,411 (+7434.38%)
Mutual labels:  loading
AMProgressHUD
A gif progress HUD for iOS.
Stars: ✭ 18 (-43.75%)
Mutual labels:  loading
Tabanimated
A skeleton screen framework based on native for iOS. (一个由iOS原生组件映射出骨架屏的框架,包含快速植入,低耦合,兼容复杂视图等特点,提供国内主流骨架屏动画的加载方案,同时支持上拉加载更多、自定制动画。)
Stars: ✭ 2,909 (+8990.63%)
Mutual labels:  loading
Is Loading
Simple library to show visual feedback when loading data or any action that would take time
Stars: ✭ 232 (+625%)
Mutual labels:  loading

react-native-whc-loading

A react native module to show loading ui, it works on iOS and Android.

release PRs Welcome NPM version License MIT 语言 中文

Content

Installation

  • 1.Run npm i react-native-whc-loading --save
  • 2.import Loading from 'react-native-whc-loading'

Demo

Screenshots

Getting started

Add react-native-whc-loading to your js file.

import Loading from 'react-native-whc-loading'

Inside your component's render method, use Loading:

 render() {
         return (
             <View style={styles.container}>
                 ...
                 <Loading ref="loading"/>
             </View>
         );
 }

Then you can use it like this:

 /// show loading ui
 this.refs.loading.show();

 /// close loading ui
 this.refs.loading.show(false);
 /// or
 this.refs.loading.close();

Or use show prop control show/hide

render() {
          return (
              <View style={styles.container}>
                  ...
                  <Loading show={true/false}/>
              </View>
          );
  }

Basic usage

render() {
        return (
            <View style={styles.container}>
                <TouchableHighlight
                    onPress={()=>{
                        this.refs.loading.show();
                    }}>
                    <Text>Start Loading</Text>
                </TouchableHighlight>
                <Loading ref="loading"/>
            </View>
        );
    }

Custom Loading

render() {
        return (
            <View style={styles.container}>
                <TouchableHighlight
                    onPress={()=>{
                        this.refs.loading.show();
                    }}>
                    <Text>Start Loading</Text>
                </TouchableHighlight>
                <Loading
                    ref="loading"
                    image=require('../path/imagename.png')
                    backgroundColor='#ffffffF2'
                    borderRadius=5
                    size=70
                    imageSize=40
                    indicatorColor='gray'
                    easing=Loading.EasingType.ease
                />
            </View>
        );
    }

API

Props Type Optional Default Description
image PropTypes.any true null Custom loading image
backgroundColor PropTypes.string true '#ffffffF2' Custom loading background color
borderRadius PropTypes.number true 5 Custom loading ui border radius
size PropTypes.number true 70 Custom loading ui height width
imageSize PropTypes.number true 40 Custom loading image size
indicatorColor PropTypes.string true 'gray' Custom default loading indicator color
easing PropTypes.func true Easing.ease Custom loading image animation type
Method Type Optional Description
show(bool) function true show a loading ui
close() function - hide loading ui

Contribution

Issues are welcome. Please add a screenshot of bug and code snippet. Quickest way to solve issue is to reproduce it on one of the examples.

Pull requests are welcome. If you want to change API or making something big better to create issue and discuss it first.


MIT Licensed

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].