Image API
API reference docs for theImage
component. For examples and details on the usage of this component, visit the component demo page.
Props
Prop | Type | Description | Default |
---|---|---|---|
alt | string | Defines an alternative text description of the image. | _ |
src | string | The image URL. | _ |
decoding? | 'sync' | 'async' | 'auto' | Indicates how the image is decoded. | _ |
height? | string | number | The intrinsic height of the image. | _ |
loading? | 'eager' | 'lazy' | Defines if the image should load immediately or defer until it is in view. | _ |
sizes? | string | A set of source size descriptors for the image for responsive behavior. | _ |
srcSet? | string | One or more image source URLs for different resolutions. | _ |
width? | string | number | The intrinsic width of the image. | _ |
onError? | (event: React.SyntheticEvent<HTMLImageElement, Event>) => void | The intrinsic width of the image. | _ |