These five React packages help developers manage loading states and placeholder content in web applications, but they serve different purposes. react-content-loader and react-loading-skeleton create skeleton screens that mimic the layout of content while it loads. react-lazy-load-image-component focuses specifically on lazy-loading images with placeholder support. react-loading provides simple spinner and loading indicator components. react-placeholder offers basic placeholder functionality for content blocks. Each tool addresses different aspects of the loading experience, from visual feedback to performance optimization.
When building React applications, handling loading states well matters for user experience. These five packages tackle different parts of the loading problem. Let's compare how they work, when to use each one, and what trade-offs you'll face in real projects.
react-content-loader creates custom SVG-based skeleton screens.
// react-content-loader: Custom skeleton design
import ContentLoader from "react-content-loader"
const MyLoader = () => (
<ContentLoader
speed={2}
width={400}
height={160}
viewBox="0 0 400 160"
backgroundColor="#f3f3f3"
foregroundColor="#ecebeb"
>
<rect x="70" y="15" rx="4" ry="4" width="117" height="6" />
<rect x="70" y="35" rx="3" ry="3" width="85" height="6" />
<circle cx="30" cy="30" r="30" />
</ContentLoader>
)
react-lazy-load-image-component handles image lazy loading with placeholders.
// react-lazy-load-image-component: Lazy image loading
import { LazyLoadImage } from 'react-lazy-load-image-component';
import 'react-lazy-load-image-component/src/effects/blur.css';
const ImageComponent = () => (
<LazyLoadImage
alt="Product"
effect="blur"
src="https://example.com/image.jpg"
placeholderSrc="https://example.com/placeholder.jpg"
/>
);
react-loading provides pre-built spinner components.
// react-loading: Simple spinner
import Loading from 'react-loading';
const Spinner = () => (
<Loading
type="spin"
color="#007bff"
height={50}
width={50}
/>
);
react-loading-skeleton generates automatic skeleton loaders.
// react-loading-skeleton: Auto-generated skeletons
import Skeleton from 'react-loading-skeleton';
import 'react-loading-skeleton/dist/skeleton.css';
const CardSkeleton = () => (
<div>
<Skeleton circle={true} height={50} width={50} />
<Skeleton height={20} width={200} />
<Skeleton count={3} />
</div>
);
react-placeholder offers basic placeholder blocks.
// react-placeholder: Basic placeholder
import { Placeholder } from 'react-placeholder';
import 'react-placeholder/lib/reactPlaceholder.css';
const BasicPlaceholder = ({ loading }) => (
<Placeholder
loading={loading}
readyColor="#fff"
loadingColor="#f1f1f1"
>
<div>Your content here</div>
</Placeholder>
);
The level of control varies significantly across these packages.
react-content-loader gives you the most control.
// Full control over every aspect
<ContentLoader
speed={2}
width={400}
height={160}
viewBox="0 0 400 160"
backgroundColor="#f3f3f3"
foregroundColor="#ecebeb"
uniqueKey="my-loader"
>
<rect x="0" y="0" rx="5" ry="5" width="100" height="100" />
<rect x="120" y="20" rx="3" ry="3" width="200" height="20" />
<rect x="120" y="60" rx="3" ry="3" width="180" height="20" />
</ContentLoader>
react-loading-skeleton balances control with simplicity.
// Control dimensions, not individual shapes
<Skeleton height={300} borderRadius={8} />
<Skeleton circle={true} height={60} width={60} />
<Skeleton count={4} height={20} />
react-loading offers limited customization.
// Limited to preset types
<Loading type="bars" color="#3498db" width={50} height={50} />
<Loading type="spinningBubbles" color="#e74c3c" />
react-lazy-load-image-component focuses on image-specific options.
// Image-specific customization
<LazyLoadImage
src="image.jpg"
placeholderSrc="placeholder.jpg"
effect="blur"
threshold={100}
wrapperProps={{ className: "image-wrapper" }}
/>
react-placeholder provides basic styling options.
// Basic color and state control
<Placeholder
loading={true}
readyColor="#ffffff"
loadingColor="#f0f0f0"
style={{ padding: '20px' }}
>
<p>Content</p>
</Placeholder>
Performance differs based on implementation approach.
react-content-loader uses SVG rendering.
// SVG-based, lightweight rendering
<ContentLoader viewBox="0 0 400 160">
<rect x="0" y="0" width="400" height="160" />
</ContentLoader>
// Renders as SVG elements in DOM
react-loading-skeleton uses CSS animations on div elements.
// CSS-based animations
<Skeleton height={100} />
// Renders as div with CSS animation classes
react-lazy-load-image-component optimizes image loading specifically.
// Defers image loading until needed
<LazyLoadImage
src="heavy-image.jpg"
threshold={500} // Load 500px before entering viewport
/>
react-loading renders simple animated elements.
// Simple animated spinner
<Loading type="spin" height={30} width={30} />
// Minimal DOM elements, CSS animation
react-placeholder wraps content with conditional rendering.
// Conditional content rendering
<Placeholder loading={isLoading}>
<Content />
</Placeholder>
// Swaps content based on loading prop
Setup time and learning curve vary across packages.
react-content-loader requires more initial setup.
// Requires manual shape design
const ProfileLoader = () => (
<ContentLoader viewBox="0 0 300 150">
<circle cx="50" cy="50" r="40" />
<rect x="110" y="30" width="150" height="20" />
<rect x="110" y="70" width="120" height="15" />
</ContentLoader>
);
react-loading-skeleton works out of the box.
// Quick implementation
{isLoading ? (
<Skeleton count={5} />
) : (
<Content />
)}
react-loading is the simplest to add.
// Simplest implementation
{isLoading && <Loading type="spin" />}
react-lazy-load-image-component requires image-specific setup.
// Replace img tags throughout project
<img src="photo.jpg" /> // Before
<LazyLoadImage src="photo.jpg" /> // After
react-placeholder needs wrapping logic.
// Wrap content with loading logic
<Placeholder loading={loading}>
<div>Content here</div>
</Placeholder>
Package maintenance affects long-term project health.
react-content-loader has active maintenance.
// Actively maintained with regular updates
// Check npm for latest version before installing
npm install react-content-loader
react-loading-skeleton is well-maintained.
// Good long-term support
npm install react-loading-skeleton
react-lazy-load-image-component focuses on image loading niche.
// Stable, niche package
npm install react-lazy-load-image-component
react-loading has basic maintenance.
// Basic maintenance level
npm install react-loading
react-placeholder has limited recent activity.
// Limited maintenance - evaluate alternatives
npm install react-placeholder
// Consider react-loading-skeleton for new projects
You're building product cards that load data from an API.
react-content-loader or react-loading-skeleton// react-content-loader for precise matching
<ProductCardLoader />
// OR react-loading-skeleton for faster implementation
{loading ? <Skeleton height={300} /> : <ProductCard />}
You need to load images as users scroll down the page.
react-lazy-load-image-component<LazyLoadImage
src={imageUrl}
effect="blur"
placeholderSrc={placeholderUrl}
/>
You need to show loading while a form submits.
react-loading{isSubmitting && <Loading type="spin" height={24} width={24} />}
You're loading widgets from different APIs at different speeds.
react-loading-skeleton<Dashboard>
<Skeleton loading={loading1}><Widget1 /></Skeleton>
<Skeleton loading={loading2}><Widget2 /></Skeleton>
<Skeleton loading={loading3}><Widget3 /></Skeleton>
</Dashboard>
You're maintaining an older React application.
react-placeholder// Existing implementation
<Placeholder loading={loading}>
<LegacyComponent />
</Placeholder>
| Feature | react-content-loader | react-lazy-load-image-component | react-loading | react-loading-skeleton | react-placeholder |
|---|---|---|---|---|---|
| Primary Use | Custom skeletons | Image lazy loading | Spinners | Auto skeletons | Basic placeholders |
| Customization | High | Medium | Low | Medium | Low |
| Setup Time | High | Medium | Low | Low | Low |
| Performance | Good | Excellent (images) | Good | Good | Good |
| Maintenance | Active | Active | Basic | Active | Limited |
| Best For | Design systems | Image galleries | Quick loaders | Fast implementation | Legacy projects |
Content-heavy pages with complex layouts → react-content-loader
Image-focused applications → react-lazy-load-image-component
Quick prototypes or simple loaders → react-loading
Standard content pages → react-loading-skeleton
Existing legacy codebases → react-placeholder
For new React projects, start with react-loading-skeleton. It offers the best balance of ease-of-use and functionality for most loading state needs. The automatic skeleton generation saves development time while still providing good UX.
For design-critical applications where loading states must match brand guidelines exactly, invest in react-content-loader. The extra setup time pays off in polished, consistent loading experiences.
For image-heavy applications, react-lazy-load-image-component is essential. It solves a different problem than skeleton loaders and should be used alongside them, not instead of them.
Avoid react-placeholder for new projects unless you have specific requirements it meets that newer packages don't. The limited maintenance could become a liability as React evolves.
Remember: loading states aren't just about showing something while data loads. They're about managing user expectations and perceived performance. Choose the tool that helps you create the smoothest experience for your specific use case.
Choose react-content-loader when you need fully customizable skeleton loaders with precise control over the SVG shapes. It's ideal for design systems where loading states must match specific brand requirements. The package gives you complete control over animation timing, colors, and shapes, but requires more setup than automatic solutions.
Choose react-lazy-load-image-component when your primary concern is image performance and lazy loading. It's specifically built for images, not general content placeholders. Use this when you need to defer image loading until they enter the viewport while showing a placeholder during the wait.
Choose react-loading when you need simple, ready-to-use spinner components without customization overhead. It's best for quick implementations where a standard loading indicator is sufficient. Avoid this for complex loading states that require skeleton screens or custom animations.
Choose react-loading-skeleton when you want skeleton loaders with minimal configuration. It automatically generates placeholders based on your content structure, making it faster to implement than react-content-loader. Ideal for projects where development speed matters more than pixel-perfect loading state design.
Choose react-placeholder only for legacy projects already using it, as this package has limited maintenance and fewer features compared to modern alternatives. For new projects, consider react-loading-skeleton or react-content-loader instead, which offer better long-term support and more features.
SVG-Powered component to easily create placeholder loadings (like Facebook's cards loading).
npm i react-content-loader --save
yarn add react-content-loader
npm i react-content-loader react-native-svg --save
yarn add react-content-loader react-native-svg
CDN from JSDELIVR
There are two ways to use it:
1. Presets, see the examples:
import ContentLoader, { Facebook } from 'react-content-loader'
const MyLoader = () => <ContentLoader />
const MyFacebookLoader = () => <Facebook />
2. Custom mode, see the online tool
const MyLoader = () => (
<ContentLoader viewBox="0 0 380 70">
{/* Only SVG shapes */}
<rect x="0" y="0" rx="5" ry="5" width="70" height="70" />
<rect x="80" y="17" rx="4" ry="4" width="300" height="13" />
<rect x="80" y="40" rx="3" ry="3" width="250" height="10" />
</ContentLoader>
)
Still not clear? Take a look at this working example at codesandbox.io Or try the components editable demo hands-on and install it from bit.dev
react-content-loader can be used with React Native in the same way as web version with the same import:
1. Presets, see the examples:
import ContentLoader, { Facebook } from 'react-content-loader/native'
const MyLoader = () => <ContentLoader />
const MyFacebookLoader = () => <Facebook />
2. Custom mode
To create custom loaders there is an important difference: as React Native doesn't have any native module for SVG components, it's necessary to import the shapes from react-native-svg or use the named export Rect and Circle from react-content-loader import:
import ContentLoader, { Rect, Circle } from 'react-content-loader/native'
const MyLoader = () => (
<ContentLoader viewBox="0 0 380 70">
<Circle cx="30" cy="30" r="30" />
<Rect x="80" y="17" rx="4" ry="4" width="300" height="13" />
<Rect x="80" y="40" rx="3" ry="3" width="250" height="10" />
</ContentLoader>
)
Prop name and type | Environment | Description |
|---|---|---|
animate?: boolean Defaults to true | React DOM React Native | Opt-out of animations with false |
title?: string Defaults to Loading... | React DOM only | It's used to describe what element it is. Use '' (empty string) to remove. |
baseUrl?: stringDefaults to an empty string | React DOM only | Required if you're using <base url="/" /> document <head/>. This prop is common used as: <ContentLoader baseUrl={window.location.pathname} /> which will fill the SVG attribute with the relative path. Related #93. |
speed?: number Defaults to 1.2 | React DOM React Native | Animation speed in seconds. |
viewBox?: string Defaults to undefined | React DOM React Native | Use viewBox props to set a custom viewBox value, for more information about how to use it, read the article How to Scale SVG. |
gradientRatio?: number Defaults to 1.2 | React DOM only | Width of the animated gradient as a fraction of the view box width. |
rtl?: boolean Defaults to false | React DOM React Native | Content right-to-left. |
backgroundColor?: string Defaults to #f5f6f7 | React DOM React Native | Used as background of animation. |
foregroundColor?: string Defaults to #eee | React DOM React Native | Used as the foreground of animation. |
backgroundOpacity?: number Defaults to 1 | React DOM React Native | Background opacity (0 = transparent, 1 = opaque) used to solve an issue in Safari |
foregroundOpacity?: number Defaults to 1 | React DOM React Native | Animation opacity (0 = transparent, 1 = opaque) used to solve an issue in Safari |
style?: React.CSSProperties Defaults to {} | React DOM only | |
uniqueKey?: string Defaults to random unique id | React DOM only | Use the same value of prop key, that will solve inconsistency on the SSR, see more here. |
beforeMask?: JSX.Element Defaults to null | React DOM React Native | Define custom shapes before content, see more here. |
See all options live
import { Facebook } from 'react-content-loader'
const MyFacebookLoader = () => <Facebook />
import { Instagram } from 'react-content-loader'
const MyInstagramLoader = () => <Instagram />
import { Code } from 'react-content-loader'
const MyCodeLoader = () => <Code />
import { List } from 'react-content-loader'
const MyListLoader = () => <List />
import { BulletList } from 'react-content-loader'
const MyBulletListLoader = () => <BulletList />
For the custom mode, use the online tool.
const MyLoader = () => (
<ContentLoader
height={140}
speed={1}
backgroundColor={'#333'}
foregroundColor={'#999'}
viewBox="0 0 380 70"
>
{/* Only SVG shapes */}
<rect x="0" y="0" rx="5" ry="5" width="70" height="70" />
<rect x="80" y="17" rx="4" ry="4" width="300" height="13" />
<rect x="80" y="40" rx="3" ry="3" width="250" height="10" />
</ContentLoader>
)

In order to avoid unexpected behavior, the package doesn't have opinioned settings. So if it needs to be responsive, have in mind that the output of the package is a regular SVG, so it just needs the same attributes to become a regular SVG responsive, which means:
import { Code } from 'react-content-loader'
const MyCodeLoader = () => (
<Code
width={100}
height={100}
viewBox="0 0 100 100"
style={{ width: '100%' }}
/>
)
As the main component generates random values to match the id of the SVG element with background style, it can encounter unexpected errors and unmatching warning on render, once the random value of id will be generated twice, in case of SSR: server and client; or in case of snapshot test: on the first match and re-running the test.
To fix it, set the prop uniqueKey, then the id will not be random anymore:
import { Facebook } from 'react-content-loader'
const MyFacebookLoader = () => <Facebook uniqueKey="my-random-value" />
When using rgba as a backgroundColor or foregroundColor value, Safari does not respect the alpha channel, meaning that the color will be opaque. To prevent this, instead of using a rgba value for backgroundColor/foregroundColor, use the rgb equivalent and move the alpha channel value to the backgroundOpacity/foregroundOpacity props.
{/* Opaque color in Safari and iOS */}
<ContentLoader
backgroundColor="rgba(0,0,0,0.06)"
foregroundColor="rgba(0,0,0,0.12)">
{/_ Semi-transparent color in Safari and iOS _/}
<ContentLoader
backgroundColor="rgb(0,0,0)"
foregroundColor="rgb(0,0,0)"
backgroundOpacity={0.06}
foregroundOpacity={0.12}>
Using the base tag on a page that contains SVG elements fails to render and it looks like a black box. Just remove the base-href tag from the <head /> and the issue has been solved.
Old browsers don't support animation in SVG (compatibility list), and if your project must support IE, for examples, here's a couple of ways to make sure that browser supports SVG Animate:
window.SVGAnimateElementdocument.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#SVG-Animation", "1.1")Fork the repo and then clone it
$ git clone git@github.com:YourUsername/react-content-loader.git && cd react-content-loader
$ npm i: Install the dependencies;
$ npm run build: Build to production;
$ npm run dev: Run the Storybook to see your changes;
$ npm run test: Run all tests: type checking, unit tests on web and native;
$ npm run test:watch: Watch unit tests;
As React Native doesn't support symbolic links (to link the dependency to another folder) and as there is no playground to check your contributions (like storybook), this is recommended strategy to run the project locally:
yarn add react-content-loader react-native-svgreact-content-loader to the project just cloned, like:
import ContentLoader, { Rect, Circle } from './react-content-loader/native'Commit messages should follow the commit message convention so, changelogs could be generated automatically by that. Commit messages are validated automatically upon commit. If you aren't familiar with the commit message convention, you can use yarn commit (or npm run commit) instead of git commit, which provides an interactive CLI for generating proper commit messages.