Image
Importβ
import { Image } from '@resultadosdigitais/tangram-components'
Propertiesβ
src πβ
alt πβ
widthβ
heightβ
roundedβ
fluidβ
fitβ
| Type | Enum of: |
|---|
Descriptionβ
Determines how the image should be resized to fit its container.
For more informations: https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit.
asβ
| Type | elementType | string |
|---|
Descriptionβ
Sets the element type to be rendered as wrapper.
By default, it will render a figure element.
errorLoadingImageβ
| Type | string |
|---|---|
| Default | Image.translations.en.loadingError |
Descriptionβ
Custom text to inform that there was an error on loading the image. It is also used as title for the icon that is displayed.
Preset values for English, Brazilian Portuguese and Spanish are available
in Image.translations.en.loadingError,
Image.translations.ptBR.loadingError, and
Image.translations.es.loadingError.
onErrorβ
| Type | func |
|---|---|
| Param | event React.SyntheticEvent - The event source of the callback. |
Descriptionβ
Callback fired when the image is not loaded.
Feedbackβ
To report a problem or suggest changes, use our improvements form or, if you prefer, open an issue on our Github repository.