npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@tonisantosbalbi/rn-skeleton

v1.0.0

Published

A customizable skeleton loading component for React Native with support for complex layouts

Downloads

5

Readme

rn-skeleton

A highly customizable skeleton loading component for React Native with support for complex layouts, animations, and theming.

Features

  • 🎨 Customizable layouts - Define complex skeleton structures with nested components
  • 🌙 Dark mode support - Automatic color adaptation based on device theme
  • Multiple animations - Shiver, pulse, or no animation
  • 🎯 TypeScript support - Fully typed components and props
  • 📱 React Native compatible - Works with Expo and bare React Native projects
  • 🚀 Performance optimized - Smooth animations with native driver support

Installation

npm install rn-skeleton react-native-linear-gradient

iOS Setup (if not using Expo)

cd ios && pod install

Android Setup (if not using Expo)

For React Native 0.60+, auto-linking should handle the setup. For older versions, follow the react-native-linear-gradient installation guide.

Usage

Basic Usage

import React, { useState, useEffect } from 'react'
import { View, Text } from 'react-native'
import { SkeletonContent } from 'rn-skeleton'

const MyComponent = () => {
  const [isLoading, setIsLoading] = useState(true)

  useEffect(() => {
    // Simulate data loading
    setTimeout(() => setIsLoading(false), 2000)
  }, [])

  return (
    <SkeletonContent
      isLoading={isLoading}
      layout={[
        { key: 'title', width: '80%', height: 20, marginBottom: 10 },
        { key: 'subtitle', width: '60%', height: 16, marginBottom: 20 },
        { key: 'content', width: '100%', height: 100 }
      ]}
    >
      <View>
        <Text>My Title</Text>
        <Text>My Subtitle</Text>
        <Text>My Content...</Text>
      </View>
    </SkeletonContent>
  )
}

Complex Layout Example

import { SkeletonContent } from 'rn-skeleton'

const ComplexSkeletonExample = () => {
  const layout = [
    {
      key: 'header',
      width: '100%',
      height: 60,
      flexDirection: 'row' as const,
      children: [
        {
          key: 'avatar',
          width: 50,
          height: 50,
          borderRadius: 25,
          marginRight: 15
        },
        {
          key: 'userInfo',
          width: '70%',
          height: 50,
          flexDirection: 'column' as const,
          justifyContent: 'space-between' as const,
          children: [
            { key: 'name', width: '80%', height: 16 },
            { key: 'time', width: '50%', height: 12 }
          ]
        }
      ]
    },
    {
      key: 'content',
      width: '100%',
      height: 200,
      marginTop: 20,
      borderRadius: 8
    }
  ]

  return (
    <SkeletonContent
      isLoading={true}
      layout={layout}
      animationType='shiver'
      animationDirection='horizontalRight'
    />
  )
}

Simple List Skeleton

import { SkeletonLoadingComponent } from 'rn-skeleton'

const ListSkeleton = () => {
  return (
    <SkeletonLoadingComponent
      quantity={5}
      width='100%'
      height={60}
      marginBetween={10}
      paddingHorizontal={20}
      paddingVertical={10}
    />
  )
}

API Reference

SkeletonContent Props

| Prop | Type | Default | Description | | -------------------- | ------------------------------- | ------------------- | ------------------------------------ | | isLoading | boolean | true | Whether to show skeleton or children | | layout | SkeletonLayoutItem[] | [] | Array of skeleton layout items | | animationType | 'none' \| 'shiver' \| 'pulse' | 'shiver' | Type of animation | | animationDirection | string | 'horizontalRight' | Direction of shiver animation | | duration | number | 1200 | Animation duration in milliseconds | | containerStyle | ViewStyle | undefined | Style for container view | | boneColor | string | Auto (theme-based) | Base skeleton color | | highlightColor | string | Auto (theme-based) | Highlight color for animation | | children | React.ReactNode | undefined | Content to show when not loading |

SkeletonLayoutItem

| Property | Type | Description | | ---------------- | ----------------------- | ------------------------------ | | key | string | Unique identifier for the item | | width | number \| string | Width of the skeleton item | | height | number \| string | Height of the skeleton item | | marginLeft | number? | Left margin | | marginRight | number? | Right margin | | marginTop | number? | Top margin | | marginBottom | number? | Bottom margin | | borderRadius | number? | Border radius (default: 4) | | children | SkeletonLayoutItem[]? | Nested skeleton items | | flexDirection | 'row' \| 'column'? | Flex direction for children | | alignItems | string? | Align items property | | justifyContent | string? | Justify content property |

SkeletonLoadingComponent Props

| Prop | Type | Default | Description | | ------------------- | ------------------ | -------- | ------------------------ | | quantity | number | Required | Number of skeleton items | | width | number \| string | Required | Width of each item | | height | number \| string | Required | Height of each item | | marginBetween | number | Required | Margin between items | | paddingHorizontal | number? | 16 | Horizontal padding | | paddingVertical | number? | 16 | Vertical padding |

Animation Types

Shiver

A shimmer effect that moves across the skeleton items.

<SkeletonContent
  animationType='shiver'
  animationDirection='horizontalRight'
  // ... other props
/>

Pulse

A pulsing opacity effect.

<SkeletonContent
  animationType='pulse'
  // ... other props
/>

None

No animation, static skeleton.

<SkeletonContent
  animationType='none'
  // ... other props
/>

Animation Directions (for Shiver)

  • horizontalLeft - Left to right
  • horizontalRight - Right to left
  • verticalTop - Top to bottom
  • verticalDown - Bottom to top
  • diagonalDownRight - Diagonal top-left to bottom-right
  • diagonalTopLeft - Diagonal bottom-right to top-left
  • diagonalTopRight - Diagonal bottom-left to top-right
  • diagonalDownLeft - Diagonal top-right to bottom-left

Theming

The component automatically adapts to light/dark mode based on the device's color scheme. You can override the colors:

<SkeletonContent
  boneColor='#E1E9EE'
  highlightColor='#F2F8FC'
  // ... other props
/>

Contributing

We welcome contributions! Please see our Contributing Guide for details.

License

MIT © Toni Santos Balbi

Support

If you find this package useful, please consider giving it a ⭐ on GitHub!