UseIMGElementStateProps
interface
UseIMGElementStateProps
{
 Â
alt
?
:
string
;
 Â
altColor
?
:
string
;
 Â
cachedNaturalDimensions
?
:
ImageDimensions
;
 Â
computeMaxWidth
?
:
(
contentWidth
:
number
)
=>
number
;
 Â
contentWidth
?
:
number
;
 Â
enableExperimentalPercentWidth
?
:
boolean
;
 Â
height
?
:
string
|
number
;
 Â
initialDimensions
?
:
ImageDimensions
;
 Â
objectFit
?
:
ObjectFit
;
 Â
source
:
ImageURISource
;
 Â
style
?
:
StyleProp
<
ImageStyle
>
;
 Â
width
?
:
string
|
number
;
}
Props for ​useIMGElementState
hook.
#
Fieldsalt
#
alt
?
:
string
;
Alt text extract from alt
attribute.
altColor
#
altColor
?
:
string
;
Alt color, defaults to color
for this ​TNode
.
cachedNaturalDimensions
#
When the natural ("physical") dimensions for this image are accessible a priori, these should be passed. It will save some API calls and filesytem access via React Native Image.getSize.
computeMaxWidth
#
computeMaxWidth
?
:
(
contentWidth
:
number
)
=>
number
;
When provided, the print image will have a max width depending on the
contentWidth
prop.
contentWidth
#
contentWidth
?
:
number
;
The contentWidth
from the ​RenderHTMLProps
.
enableExperimentalPercentWidth
#
enableExperimentalPercentWidth
?
:
boolean
;
Allow experimental percent width for the print dimensions computation.
The percent will be relative to contentWidth
height
#
height
?
:
string
|
number
;
The value of the height
attribute.
initialDimensions
#
Rendered dimensions prior to retrieving natural dimensions of the image.
objectFit
#
objectFit
?
:
ObjectFit
;
The value of the object-fit
CSS property.
source
#
source
:
ImageURISource
;
The source to paint.
style
#
style
?
:
StyleProp
<
ImageStyle
>
;
The style for this image.
width
#
width
?
:
string
|
number
;
The value of the width
attribute.