Image

<Image> displays raster (PNG/JPEG/GIF) or SVG images inline. It uses the
terminal’s best graphics protocol (Kitty / iTerm2 / Sixel) when available and
falls back to Unicode half-block “ANSI art” otherwise — and on the web backend it
paints straight to the canvas.
import { Image } from "@huyz0/ztui/react";
// From a file path…<Image src="./logo.png" style={{ width: 20, height: 10 }} />
// …or force the Unicode block fallback regardless of capability:<Image src="./logo.svg" ansi style={{ width: 20, height: 10 }} />Key props
Section titled “Key props”src— a file path or inline SVG markup.buffer— raw image bytes, as an alternative tosrc.ansi— force the Unicode half-block fallback instead of a graphics protocol.