Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@james-kirawan/expo-skeleton-placeholder
Advanced tools
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-gradient
Using npm:
npm install @react-native-masked-view/masked-view react-native-linear-gradient --save
If you are running a react-native version below 0.60:
react-native link @react-native-masked-view/masked-view react-native-linear-gradient
Otherwise:
cd ios
pod install
Using yarn:
yarn add @james-kirawan/expo-skeleton-placeholder
Using npm:
npm install @james-kirawan/expo-skeleton-placeholder --save
There 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 (
<SkeletonPlaceholder borderRadius={4}>
<SkeletonPlaceholder.Item flexDirection="row" alignItems="center">
<SkeletonPlaceholder.Item width={60} height={60} borderRadius={50} />
<SkeletonPlaceholder.Item marginLeft={20}>
<SkeletonPlaceholder.Item width={120} height={20} />
<SkeletonPlaceholder.Item marginTop={6} width={80} height={20} />
</SkeletonPlaceholder.Item>
</SkeletonPlaceholder.Item>
</SkeletonPlaceholder>
);
};
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 (
<SkeletonPlaceholder borderRadius={4}>
<View style={{flexDirection: 'row', alignItems: 'center'}}>
<View style={{width: 60, height: 60, borderRadius: 50}} />
<View style={{marginLeft: 20}}>
<Image style={{width: 120, height: 20}} src={requre('./src/assets/image.png')} />
<Text style={{marginTop: 6, fontSize: 14, lineHeight: 18}}>Hello world</Text>
</View>
</View>
</SkeletonPlaceholder>
);
};
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!
FAQs
SkeletonPlaceholder is a React Native library to easily create an amazing loading effect.
We found that @james-kirawan/expo-skeleton-placeholder demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.