🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

react-native-skaleton-kit

Package Overview
Dependencies
Maintainers
0
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-skaleton-kit

✨ Elegant Loading Skeleton for React Native - Built with Reanimated V3 Magic! ✨

0.1.9
latest
Source
npm
Version published
Weekly downloads
288
-5.88%
Maintainers
0
Weekly downloads
 
Created
Source

React Native Skaleton Kit

A high-performance (60FPS) skeleton loading animation library for React Native, powered by Reanimated 3. Create beautiful shimmering and pulsing loading states with customizable animations.

npm license platform

Features

  • 🌊 Smooth shimmer and pulse animations
  • ⚡️ Built with Reanimated 3 for optimal performance
  • 🎨 Highly customizable animations and styling
  • 📱 Support for React Native CLI projects

Demo

https://github.com/user-attachments/assets/943132f3-dd3d-43ec-9fa5-94937ace14d1

Note: Currently available for React Native CLI projects only.

Installation

Install the package using your preferred package manager:

# Using yarn
yarn add react-native-skaleton-kit

# Using npm
npm install react-native-skaleton-kit

# For iOS, install pods
cd ios && pod install

Peer Dependencies

You'll need to install and configure the following peer dependencies if you haven't already:

Make sure to also follow their respective setup instructions.

Compatibility

  • Minimum React Native version supported: 0.63.0 because Reanimated 3 works with RN 0.63 and above
  • React Native Linear Gradient: >=2.8.3
  • React Native Reanimated: Version depends on your React Native version. Please refer to the Reanimated compatibility table to select the appropriate version.

Usage

Import the necessary components and enums:

import {
  SkaletonView,
  ANIMATION_TYPE,
  ANIMATION_DIRECTION,
} from 'react-native-skaleton-kit';

Basic usage:

<SkaletonView
  viewHeight={100}
  animationType={ANIMATION_TYPE.shiver}
  direction={ANIMATION_DIRECTION.leftToRight}
  viewWidth={'100%'}
/>

For more examples, check out our example app.

Props

NameTypeRequiredDefaultDescription
viewHeightDimensionValue-Height of the skeleton view
viewWidthDimensionValue-Width of the skeleton view
styleViewStyle{}Additional styles for the container
backgroundColorstring'#DDEAF5'Background color of the skeleton
directionANIMATION_DIRECTION'leftToRight'Direction of the shimmer animation
animationTypeANIMATION_TYPE'shiver'Type of animation ('shiver' or 'pulse')
pulseConfigPulseConfigSee belowConfiguration for pulse animation

Animation Types

enum ANIMATION_TYPE {
  shiver = 'shiver',
  pulse = 'pulse'
}

Animation Directions

enum ANIMATION_DIRECTION {
  leftToRight = 'leftToRight',
  rightToLeft = 'rightToLeft',
  topToBottom = 'topToBottom',
  bottomToTop = 'bottomToTop'
}

Default Pulse Configuration

const DEFAULT_PULSE_CONFIG = {
  animationDuration: 1000,
  easing: Easing.linear,
  minOpacity: 0.4
}

License

MIT

Keywords

react-native

FAQs

Package last updated on 04 Jan 2025

Did you know?

Socket

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.

Install

Related posts