Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

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.

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.

Element