Skip to content

rfreling/image

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rc-image


React Image.

NPM version CircleCI status Test coverage Dependencies DevDependencies npm download bundle size

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

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.

About

🖼 React Image Component

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 74.3%
  • Less 22.8%
  • JavaScript 2.9%