Image
Image(
props):Element
A picture from a file, such as an item’s sprite. An icon from the
engine’s set is an Icon.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
props |
{ className?: string; label: string; src: string; style?: CSSProperties; } |
- |
props.className? |
string |
Its size and fit, such as size-10 object-contain, and [image-rendering:pixelated] for pixel art. |
props.label |
string |
What the picture shows, for a screen reader; empty for a picture that only decorates, which a screen reader then passes over. |
props.src |
string |
The picture’s address, as an import of the file or a path the game serves gives it. |
props.style? |
CSSProperties |
A style that comes from data, such as a place on a grid. |
Returns
Section titled “Returns”Element