Back to missions
Experiments

Simple React Skeleton

A first NPM package that turns repeated skeleton-loading UI work into a small, reusable component system.

May 2024pluginReact · TypeScript · Storybook
SRS

The repeated blank space

While building small websites for practice, I kept reaching the same point: the data was still loading, but the page already needed to communicate its shape. I was recreating the same text bars, image blocks, and profile placeholders in project after project.

The problem was not that skeleton loaders were impossible to find. It was that I wanted to understand the pattern myself, then make the pieces easy to reuse.

From copied markup to a component

Simple React Skeleton became my first NPM package. The central component can accept an ordered list of placeholder pieces, or compose smaller building blocks as children:

  • Text lines, including a shorter half-width line
  • Image blocks, including circular profile placeholders
  • Light and dark presentation modes
  • Optional outlines and custom styles

That small API gave the loading state a predictable vocabulary without tying it to one particular page layout.

Packaging the idea

The project was also my first experience taking something I had built for myself and preparing it as a package other React projects could install. I worked through TypeScript declarations, Rollup output, package metadata, and a Storybook setup for seeing the components in isolation.

The useful lesson

The package was intentionally modest, but the exercise was not. It taught me to notice repeated interface work, name the underlying pattern, and give it an API that stays flexible when the next project looks a little different.