ImageSize
In pixels, as an Image's onLoad reports it.
Usage
Read an image's dimensions before layout.
// Read an image's dimensions before layout.
import { Image, image, signal, type ImageSize } from 'kuito';
const natural = signal<ImageSize | null>(null);
image.prefetch('https://example.com/banner.jpg').then((size) => (natural.value = size));
<Image
src="https://example.com/banner.jpg"
width="100%"
aspectRatio={natural.value ? natural.value.width / natural.value.height : 16 / 9}
/>;Type declaration
export type ImageSize = { width: number; height: number };Members 2
| Name | Type | Required | Description |
|---|---|---|---|
width | number | Yes | — |
height | number | Yes | — |
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.