Refactored JSX elements from lowercase to PascalCase, including `<scene>` to `<Scene>`, `<text>` to `<Text>`, and others, to improve consistency and clarity in the codebase. Updated related documentation to reflect these changes, ensuring that the usage of JSX elements aligns with the new naming conventions. This update enhances the overall readability and usability of the JSX API.
570 B
570 B
<Image>
An image. src resolves to an image asset (see media.md).
<Image src="/photo.jpg" x={40} y={40} width={200} height={112} />
Props
All common props, plus:
| Prop | Type | Default | Meaning |
|---|---|---|---|
src |
string | AssetRef |
required | See media.md. |
objectFit |
"cover" | "contain" | "fill" |
"cover" |
How the source maps into the box. |
A paint child draws over the media paint created by src (see paints.md).