Image
Displays files, URLs, encoded bytes or raw RGBA pixels.
Import
import { Image } from "@tarve/core";Usage
import { Image } from "@tarve/core";
<Image src="assets/photo.jpg" width={320} height={200} fit="cover" style={{ radius: 12 }} />Props
| Prop | Type | Default |
|---|---|---|
src required Local path, data URL, encoded bytes, or raw RGBA8 pixels. | ImageSource | — |
fit | "cover" | "contain" | — |
height | number | — |
width | number | — |
Common props
Shared by every component. See descriptions →
childrenhighlightidkeymotionFromonHighlightonPasteonTransitionEndrovingGroupstyleTypes
type ImageSource = string | Uint8Array | ImageBytesSource | ImageRgbaSource;