1.0.2 • Published 6 years ago

rn-loading-wireframe v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

rn-loading-wireframe

It can help showing loading wireframe effect for its wrapped components.

Features

  • Support in React Native for both Android and iOS
  • Possible to wrap more than one child component
  • Easy to use
  • Some customizations
  • Produces wireframe with the size style corresponding the style of the wrapped child elements

Demo

Installation

  • Using Npm
npm install rn-loading-wireframe --save
  • Using Yarn
yarn add rn-loading-wireframe --dev

Example

import LoadingWireframe from 'rn-loading-wireframe';

<LoadingWireframe loading={true} color='#bdc3c7' fadeDuration={1000}>
  <Text
    style={{
      fontSize: 20,
      fontWeight: 'bold',
      width: 200,
      height: 25
    }}>
    Loading Wireframe
  </Text>
  <Text
    style={{
      marginTop: 5,
      width: 400,
      height: 20
    }}>
    It can help showing loading wireframe effect
  </Text>
  <TouchableHighlight
    style={{
      marginTop: 10,
      width: 100,
      height: 40,
      justifyContent: 'center',
      alignItems: 'center',
      backgroundColor: 'orange',
      borderRadius: 6
    }}>
    <Text style={{ color: '#fff' }}>Download</Text>
  </TouchableHighlight>
</LoadingWireframe>;

Usage

Available props

NameTypeDefaultDescription
loadingboolfalseShould show the loading wireframe?
colorstring#bdc3c7Color of the loading wireframe
fadeDurationnumber1000Duration of fading blink
lowestFadeOpacitynumber0.2The lowest opacity when fading out