Skip to content

A React component to easily replicate your page with nice placeholders while the content is loading

License

Notifications You must be signed in to change notification settings

artursvonda/react-pure-placeholder

 
 

Repository files navigation

React Placeholder

A light React component library to provide placeholders while content is loading. Suited for use with lazy and Suspense.

image

import React, { lazy, Suspense } from 'react';
import { MediaPlaceholder } from 'react-pure-placeholder';

const MyComponent = lazy(() => import('./MyComponent'));

React.renderComponent(
  <div>
    <Suspense placeholder={<MediaPlaceholder rows={7} />}>
      <MyComponent />
    </Suspense>
  </div>,
  document.body);

Storybook and Live Demo

Install

npm install --save react-pure-placeholder

or

yarn add react-pure-placeholder

About

A React component to easily replicate your page with nice placeholders while the content is loading

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 71.6%
  • JavaScript 28.4%