Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
react-native-skeleton-loading
Advanced tools
Smooth Skeleton Loader For expo and react-native. It is built on the top of react-native-reanimated v3, making it ectremely smooth and flawless.
iOS | Android | React Native Cli |
---|---|---|
✅ | ✅ | ✅ |
For Expo Loader (Click Here)
$ npm install react-native-skeleton-loading
OR
$ yarn add react-native-skeleton-loading
This package is based on react-natve-reanimated 3 so according to their documentation, you need to initialize that in babel.config.js. To do that stop the metro bundler and then add following line of code to the return object of babel.config.js
plugins: ['react-native-reanimated/plugin']
After adding the line of code, start the bundler or project with --clear tag like,
npx expo start --clear
This will clear the bundler cache and you are ready to go.
All you need is to just import the skeleton loading component, and in between the closing and ending tags, you can design the UI of your skeleton loading screen as shown in the code snippet below:
import SkeletonLoading from 'react-native-skeleton-loading'
const App = () => {
return(
<SkeletonLoading background={"#adadad"} highlight={"#ffffff"}>
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
<View style={{ width: 100, height: 100, backgroundColor: "#adadad", borderRadius: 10 }} />
<View style={{ flex:1, marginLeft: 10 }}>
<View style={{ backgroundColor: "#adadad", width: "50%", height: 10, marginBottom: 3, borderRadius: 5 }} />
<View style={{ backgroundColor: "#adadad", width: '20%', height: 8, borderRadius: 5 }} />
<View style={{ backgroundColor: "#adadad", width: '15%', height: 8, borderRadius: 5, marginTop: 3 }} />
</View>
</View>
</SkeletonLoading>
)
};
For Live Demo
(Expo Snack)
Name | Type | Description |
---|---|---|
background | hex color string | Hex color string for the background of loading component |
highlight | hex color string | Hex color string for the highlight of loading component |
If you would like me come up with similar packages, buy me a cup of coffee to boost my energy.
FAQs
Smooth Skeleton Loader For expo and react-native. It is built on the top of react-native-reanimated v3, making it ectremely smooth and flawless.
The npm package react-native-skeleton-loading receives a total of 259 weekly downloads. As such, react-native-skeleton-loading popularity was classified as not popular.
We found that react-native-skeleton-loading demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.