1.0.0 • Published 5 years ago

react-placeholder-img v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

React Placeholder Image

A simple react component that renders a placeholder image with the specified dimensions.

Useful for Whiteboxing a React application.

Features

  • Renders an svg image with background cross
  • Renders the image dimensions
  • Supports pixel and percentage based dimensions

Example

Example Image

Usage

Install the component

npm i react-placeholder-img

Add placeholders to your components

import PlaceHolderImage from 'react-placeholder-img';

export const Home = () => (
  <div>
    <PlaceHolderImage width="220px" height="160px" />
  </div>
);