React Image.
- Placeholder
- Preview
- Rotate
- Zoom
- Fallback
npm install
npm start
const Image = require('rc-image');
ReactDOM.render(
<Image src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png" />
), document.getElementById('root'));
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 |
http://localhost:8003/examples/
npm test
npm run coverage
rc-image is released under the MIT license.