TLImageShapeProps
See source codeProperties for an image shape. Image shapes display raster images on the canvas, with support for cropping, flipping, and asset management.
interface TLImageShapeProps {}Example
const imageProps: TLImageShapeProps = {
w: 300,
h: 200,
playing: true,
url: 'https://example.com/image.jpg',
assetId: 'asset:image123',
crop: null,
flipX: false,
flipY: false,
altText: 'A sample image',
}Properties
altText
Alternative text for accessibility and when image fails to load
altText: stringassetId
ID of the associated asset record, null if no asset
assetId: null | TLAssetIdcrop
Crop data defining visible region of the image, null for no cropping
crop: null | TLShapeCropflipX
Whether to flip the image horizontally
flipX: booleanflipY
Whether to flip the image vertically
flipY: booleanh
Height of the image shape in canvas units
h: numberplaying
Whether animated images (like GIFs) should play
playing: booleanurl
URL of the image resource
url: stringw
Width of the image shape in canvas units
w: numberPrev
TLHighlightShapePropsNext
TLInstance