1.0.3 • Published 2 years ago

react-native-game-loader v1.0.3

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

react-native-game-loader

Usage

import Loader from "react-native-game-loader";

function App() {
    return (
        <Loader
            barProgress={0.52}
            barStyle={{
                activeColor: "#ff9327",
                backgroundColor: "#654321",
            }}
            backgroundSource={require('./assets/background.png')}
            logoSource={require('./assets/logo.png')}
        />
    );
}

Properties

PropTypeDefaultDescription
backgroundSourceImageSourcePropTyperequiredAsset used as background
logoSourceImageSourcePropTyperequiredAsset used as logo
logoTopOffsetnumber0.05 (5% of screen height)Top margin for the logoIf value is between 0 and 1 - works as percentage of screen height
logoWidthnumber80% of screen widthWidth of the logo
barProgressnumberrequiredNumber from 0 to 1 representing loading progress
barTextStyleTextStyleStyles for the progress bar's text
barStyleViewStylerequiredStyles for the progress bar
barStyle.activeColorstringrequiredColor of active part of progress bar
barStyle.backgroundColorstringrequiredColor of progress bar's background
barStyle.widthnumber80% of device screen widthWidth of progress bar
barStyle.heightnumber20Height of progress bar
barStyle.paddingnumber3Padding between background and active part
barStyle.borderRadiusnumberbar height / 2 (fully rounded)Border radius of progress bar