mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-03 16:39:41 +08:00
d8c617d7c3
* feat: support maskClassName * test: Add snapshot * docs: Update doc
1.2 KiB
1.2 KiB
category | type | title | cols | cover |
---|---|---|---|---|
Components | Data Display | Image | 2 | https://gw.alipayobjects.com/zos/antfincdn/D1dXz9PZqa/image.svg |
Previewable image.
When To Use
- When you need to display pictures.
- Display when loading a large image or fault tolerant handling when loading fail.
API
Property | Description | Type | Default | Version |
---|---|---|---|---|
alt | Image description | string | - | 4.6.0 |
fallback | Load failure fault-tolerant src | string | - | 4.6.0 |
height | Image height | string | number | - | 4.6.0 |
placeholder | Load placeholder, use default placeholder when set true |
ReactNode | - | 4.6.0 |
preview | preview config, disabled when false |
boolean | previewType | true | 4.6.0 previewType:4.7.0 |
src | Image path | string | - | 4.6.0 |
width | Image width | string | number | - | 4.6.0 |
previewType
{
visible?: boolean;
onVisibleChange?: (visible, prevVisible) => void;
getContainer?: string | HTMLElement | (() => HTMLElement); // V4.8.0
src?: string; // V4.10.0
mask?: ReactNode; // V4.9.0
maskClassName?: string; // V4.11.0
}
Other attributes <img>