explaingit

danilowoz/react-content-loader

13,995TypeScriptAudience · developerComplexity · 2/5Setup · easy

TLDR

React Content Loader is a tiny React component for creating animated SVG skeleton placeholder screens, the pulsing gray shapes shown while a page's real content is still loading.

Mindmap

mindmap
  root((react-content-loader))
    What It Does
      Loading placeholders
      SVG animations
      Skeleton screens
    Features
      Ready-made presets
      Custom SVG shapes
      React Native support
    Customization
      Colors and speed
      Right-to-left layout
      ViewBox sizing
    Tech
      React TypeScript
      SVG
      npm yarn
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Drop a Facebook-style card placeholder into a React page while data loads from an API.

USE CASE 2

Design a custom skeleton loader that matches the exact shape of your content using SVG rectangles and circles.

USE CASE 3

Use the same skeleton component in both a React web app and a React Native mobile app with the same API.

Tech stack

TypeScriptReactSVGReact Nativenpm

Getting it running

Difficulty · easy Time to first run · 5min

In plain English

React Content Loader is a small component for React that creates placeholder loading screens, the gray animated shapes a web page or app shows while its real content is still arriving. The README points to Facebook's loading cards as the familiar example. These placeholders are drawn with SVG, a format that describes images using shapes and math so they stay sharp at any size. React itself is a widely used tool for building user interfaces. The README highlights a few selling points. You can change the colors, animation speed, and sizes, and support right-to-left layouts. It comes with ready-made presets so you can drop one in without much effort, and there is a separate web tool called create-content-loader for designing your own shapes visually. The same component works in React Native, the version of React used to build mobile apps, with the same interface. For the web version the README notes it is very small, under two kilobytes, and has no other dependencies. You install it through the npm or yarn package managers, and the React Native setup needs one extra package for drawing SVG shapes. There are two ways to use it. You can import a preset, such as the Facebook layout, and place it in your page as is. Or you can build a custom loader by writing the SVG shapes yourself, like rectangles and circles, inside the component to match the shape of the content you are waiting on. The README links to a live example on CodeSandbox for people who want to see it working. The rest of the README documents the settings the component accepts. These include turning the animation on or off, setting the speed in seconds, choosing the background and foreground colors and their opacity, adjusting the size through a viewBox value, enabling right-to-left direction, and adding a title that describes the element. Each setting notes whether it applies to the web version, React Native, or both.

Copy-paste prompts

Prompt 1
Show me how to use react-content-loader to create a skeleton placeholder that matches a user profile card with an avatar circle and two text lines.
Prompt 2
How do I use the create-content-loader web tool to design a custom skeleton shape and then paste the output into my React project?
Prompt 3
Give me react-content-loader code for a skeleton grid of six product cards that animate while the shop inventory loads.
Prompt 4
How do I set up react-content-loader in a React Native project, including the extra SVG dependency it needs?
Prompt 5
Show me how to change the animation speed and background color of a react-content-loader skeleton to match a dark theme.
Open on GitHub → Explain another repo

← danilowoz on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.