1.0.5 • Published 7 years ago

react-holder-component v1.0.5

Weekly downloads
142
License
MIT
Repository
github
Last release
7 years ago

react-holder-component

forked from Dieter Luypaert's react-holder.

A <Holder /> component for React which can render placeholders as provided by holder-js.

Important: holder-js generates its SVG's using DOM SVG features. For this reason react-dom is included as a dependency. You won't be able to use this for server-side rendering.

Install

npm install react-holder-component

## Usage

import Holder from 'react-holder-component'

export class Logo extends Component {
  render() {
    return (
      <div>
        <Holder
          // width and height can be a number or a string
          width="100%"
          height="200px"

          // default: false
          updateOnResize={true}

          // All holder-js options are supported here.
          // https://github.com/imsky/holder

          // Other props will be passed on to the generated <img /> tag
          className={'my-custom-class'}
        />
      </div>
    )
  }
}

Building

npm install
npm run build

Contributing

Contributions are welcome! Please see CONTRIBUTING.md.

License

MIT - see LICENSE.md

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago