SkeletonPlaceholder is a React Native library to easily create an amazing loading effect.
SkeletonPlaceholder is a React Native library to easily create an amazing loading effect.
SkeletonPlaceholder is a React Native library to easily create an amazing loading effect with FlexBox.
Android and iOS
Note: This package requires @react-native-masked-view/masked-view and react-native-linear-gradient
Using yarn:
yarn add @react-native-masked-view/masked-view react-native-linear-gradientUsing npm:
npm install @react-native-masked-view/masked-view react-native-linear-gradient --saveIf you are running a react-native version below 0.60:
react-native link @react-native-masked-view/masked-view react-native-linear-gradientOtherwise:
cd ios
pod install
Using yarn:
yarn add react-native-skeleton-placeholderUsing npm:
npm install react-native-skeleton-placeholder --saveThere are two ways to use this package:
with SkeletonPlacehoder.Item
import React from 'react';
import {View} from 'react-native';
import SkeletonPlaceholder from 'react-native-skeleton-placeholder';
const App = () => {
return (
);
};or with View, Text or Image
import React from 'react';
import {View} from 'react-native';
import SkeletonPlaceholder from 'react-native-skeleton-placeholder';
const App = () => {
return (
Hello world
);
};| Prop | Description | Type | Default |
|---|---|---|---|
| backgroundColor | Determines the color of placeholder | string | #E1E9EE |
| highlightColor | Determines the highlight color of placeholder | string (hex | rgb | rgba) | #F2F8FC |
| speed | Determines the animation speed in milliseconds. 0 disables animation | number | 800 |
| direction | Determines the animation direction | "right" | "left" | "right" |
| enabled | Determines if Skeleton should show placeholders or its children | boolean | true |
| borderRadius | Determines default border radius for placeholders | number | undefined |
| Prop | Description | Type | Default |
|---|---|---|---|
| any | Any view style props was accepted | any |
You are welcome to contribute!
No open issues yet, or sync has not completed.