![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
rn-skeleton
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. [ANDROID & IOS]
Note: If your project already includes the react-native-linear-gradient you can skip the Step #1
Using yarn:
yarn add react-native-linear-gradient
Using npm:
npm install react-native-linear-gradient --save
If you are running a react-native version below 0.60:
react-native link react-native-linear-gradient
Otherwise:
cd ios
pod install
Using yarn:
yarn add react-native-skeleton-placeholder
Using npm:
npm install react-native-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>
<SkeletonPlaceholder.Item flexDirection="row" alignItems="center">
<SkeletonPlaceholder.Item width={60} height={60} borderRadius={50} />
<SkeletonPlaceholder.Item marginLeft={20}>
<SkeletonPlaceholder.Item width={120} height={20} borderRadius={4} />
<SkeletonPlaceholder.Item
marginTop={6}
width={80}
height={20}
borderRadius={4}
/>
</SkeletonPlaceholder.Item>
</SkeletonPlaceholder.Item>
</SkeletonPlaceholder>
);
};
or with View
import React from "react";
import { View } from "react-native";
import SkeletonPlaceholder from "react-native-skeleton-placeholder";
const App = () => {
return (
<SkeletonPlaceholder>
<View style={{ flexDirection: "row", alignItems: "center" }}>
<View style={{ width: 60, height: 60, borderRadius: 50 }} />
<View style={{ marginLeft: 20 }}>
<View style={{ width: 120, height: 20, borderRadius: 4 }} />
<View
style={{ marginTop: 6, width: 80, height: 20, borderRadius: 4 }}
/>
</View>
</View>
</SkeletonPlaceholder>
);
};
Prop | Description | Type | Default |
---|---|---|---|
backgroundColor | Determines the color of placeholder | string | #E1E9EE |
highlightColor | Determines the highlight color of placeholder | string | #F2F8FC |
speed | Determines the animation speed in milliseconds | number | 800 |
Prop | Description | Type | Default |
---|---|---|---|
any | Any view style props was accepted | any |
Any help this module will be appreciated!
FAQs
SkeletonPlaceholder is a React Native library to easily create an amazing loading effect.
The npm package rn-skeleton receives a total of 0 weekly downloads. As such, rn-skeleton popularity was classified as not popular.
We found that rn-skeleton 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.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.