Skip to content

Image

The <Image> primitive embeds an external image (PNG, JPEG, SVG, WebP, or GIF) into your scene. It supports rounded corners, circular/elliptical clipping, and all the standard spatial and animation props.

0.00s / 3.97s · F0
PropTypeDefaultDescription
srcstringRequired. Image URL or data URI
xnumberRequired. X coordinate of the top-left corner
ynumberRequired. Y coordinate of the top-left corner
widthnumberRequired. Rendered width
heightnumberRequired. Rendered height
preserveAspectRatiostring'xMidYMid meet'SVG aspect-ratio keyword
borderRadiusnumber0Corner radius for rounded images
clipShape'none' | 'circle' | 'ellipse''none'Clip the image to a shape
opacitynumber1Opacity from 0 to 1
rotationnumber0Rotation in degrees
rotationOrigin[number, number]element centerCenter point for rotation
scalenumber | [number, number]1Uniform or per-axis scale
translate[number, number][0, 0]Translation offset [dx, dy]
fadeInnumberFade in over N frames
fadeOutnumberFade out over N frames
zIndexnumber0Rendering order (higher = on top)
import { Player, Image } from '@elucim/core';
<Player width={500} height={300} fps={30} durationInFrames={60}>
<Image src="/photo.png" x={100} y={50} width={300} height={200} />
</Player>
<Image
src="/avatar.png"
x={200} y={100} width={100} height={100}
clipShape="circle"
/>
<Image
src="/thumbnail.jpg"
x={50} y={50} width={400} height={250}
borderRadius={20}
/>
<Image
src="/diagram.svg"
x={100} y={50} width={200} height={200}
rotation={15}
/>
<FadeIn duration={30}>
<Image src="/hero.png" x={0} y={0} width={500} height={300} />
</FadeIn>