Skip to content
  • Android
  • iOS
  • Web

Image

Render a local or remote image with a text alternative.

Engine API NImagenayan-ui/components

Live examples

Example.tsx

Attributes

NImage attributes
NameTypeDefaultDetails
srcstringOptional
altstringOptional
fallbackSourceNImageSourceOptional
widthnumberOptional
heightnumberOptional
classNamestringOptionalSupported Tailwind-style utilities, resolved entirely in Rust. See the engine README.
loading"eager" | "lazy"Optional
sourceNImageSourceOptional
contentFit"fill" | "cover" | "contain" | "none" | "scale-down"Optional
onLoad((event: NImageLoadEvent) => void)Optional
onError((event: NImageErrorEvent) => void)Optional

Tags