Skip to content

Placeholder image component for react, utilizing images from placeholder.com (formerly placehold.it).

Notifications You must be signed in to change notification settings

zhuber/react-placeholder-images

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Placeholder Images npm version

Image placeholder component, utilizing images from placeholder.com (formerly placehold.it).

Options

  • text
  • width
  • height (optional)
  • color
  • textColor
  • format

Usage

import { PlaceholderImage } from 'react-placeholder-images';

class Demo extends React.Component {
  render() {
    return (
      <PlaceholderImage
        width={500}
        height={225}
        color="F48942"
        textColor="FFFFFF"
        text="Text, color & textColor"
      />
      <br />
      <PlaceholderImage
        width={500}
        height={100}
        text="Text, no color"
      />
      <br />
      <PlaceholderImage
        width={500}
        height={100}
        color="1E5EFF"
      />
      <br />
      <PlaceholderImage
        width={500}
        format="png"
      />
    );
  }
}

About

Placeholder image component for react, utilizing images from placeholder.com (formerly placehold.it).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published