@innodata/rc-image
TypeScript icon, indicating that this package has built-in type declarations

3.0.7 • Public • Published

rc-image


React Image

NPM version build status Test coverage gemnasium deps npm download

Feature

  • [x] Placeholder
  • [x] Preview
  • [x] Rotate
  • [x] Zoom
  • [x] Fallback

Keyboard

install

rc-image

Usage

npm install
npm start
const Image = require('rc-image');

ReactDOM.render(
  <Image src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png" />
), document.getElementById('root'));

API

Name Type Default Description
preview boolean true Whether to show preview
prefixCls string rc-image Classname prefix
placeholder boolean | ReactElement - if true will set default placeholder or use ReactElement set customize placeholder
fallback string - Load failed src
onPreviewClose function(e) - Preview close callback
previewPrefixCls string rc-image-preview Preview classname prefix

Example

http://localhost:8003/examples/

Test Case

npm test

Coverage

npm run coverage

License

rc-image is released under the MIT license.

Package Sidebar

Install

npm i @innodata/rc-image

Weekly Downloads

1

Version

3.0.7

License

MIT

Unpacked Size

47.8 kB

Total Files

24

Last publish

Collaborators

  • artemprodigy