Socket
Socket
Sign inDemoInstall

@innodata/rc-image

Package Overview
Dependencies
25
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @innodata/rc-image

React easy to use image component


Version published
Weekly downloads
4
increased by300%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

rc-image


React Image

NPM version build status Test coverage gemnasium deps npm download

Feature

  • Placeholder
  • Preview
  • Rotate
  • Zoom
  • 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

NameTypeDefaultDescription
previewbooleantrueWhether to show preview
prefixClsstringrc-imageClassname prefix
placeholderboolean | ReactElement-if true will set default placeholder or use ReactElement set customize placeholder
fallbackstring-Load failed src
onPreviewClosefunction(e)-Preview close callback
previewPrefixClsstringrc-image-previewPreview classname prefix

Example

http://localhost:8003/examples/

Test Case

npm test

Coverage

npm run coverage

License

rc-image is released under the MIT license.

Keywords

FAQs

Last updated on 28 Aug 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc