Coder Social home page Coder Social logo

themodernjavascript / react-native-splash-screen-mask Goto Github PK

View Code? Open in Web Editor NEW
10.0 2.0 1.0 408 KB

A splash screen for react-native, It hide when application loaded. It works on iOS, Android and Window.

License: MIT License

JavaScript 100.00%
react-native splash-screen splashscreen android ios launchimage launchscreen launch-screen react reactjs

react-native-splash-screen-mask's Introduction

react-native-splash-screen-mask

version downloads license.

A splash screen for react-native, It hide when application loaded. It works on iOS, Android and Window.

Content

Examples

Examples

react-native-splash-screen-mask

Installation

$ npm install react-native-splash-screen-mask --save

Usage

Use like so:

import React, { Component } from 'react';
import { StyleSheet } from 'react-native';
import SplashScreenMask from 'react-native-splash-screen-mask';
import { Actions } from 'react-native-router-flux';

import IMAGE from '../assets/react.png';

export default class SplashScreen extends Component {
  render() {
    return (
      <SplashScreenMask
        imageSource={IMAGE}
        navigationAction={() => Actions.homeScene()}
        backgroundStyle={styles.backgroundStyle}
        duration={3000}
      />
    );
  }
}

const styles = StyleSheet.create({
  backgroundStyle: {
    backgroundColor: '#fff',
  },
});

Props

props Type Optional Default Description
imageSource any no The image (png, jpg, jpeg, gif) splash screen.
navigationAction any no Redirect callback function (can be used react-native-router-flux or anything else).
backgroundStyle any yes { backgroundColor: '#fff' } The style of splash screen background.
duration number yes 3000 (3 seconds) Duration for loading the splash screen.

Wrap Up

If you think any of the react-native-splash-screen-mask can be improved, please do open a PR with any updates and submit any issues. Also, I will continue to improve this, so you might want to watch/star this repository to revisit.

Contribution

We'd love to have your helping hand on contributions to react-native-splash-screen-mask by forking and sending a pull request.

Your contributions are heartily โ™ก welcome, recognized and appreciated.

How to contribute:

  • Open pull request with improvements
  • Discuss ideas in issues
  • Spread the word
  • Reach out with any feedback

License

The MIT License License: MIT

react-native-splash-screen-mask's People

Contributors

bunlong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

jzarca01

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.