import type * as React from 'react'; import type { ImageLoadingStatus } from '../avatar/types.js'; import type { PrimitivePropsWithRef } from '../utils/primitive.js'; export type { ImageLoadingStatus }; /** Props for the {@link Image} root image element. */ export interface ImageProps extends Omit, 'alt'> { /** Accessible description of the image; pass `""` to opt out for a purely decorative one. */ alt: string; /** * Wrap image and fallback in AspectRatio; the ref still points at the image. * @default undefined */ aspectRatio?: number | undefined; /** * Native `loading` hint, forwarded to the rendered ``. * @default 'lazy' — the library's own default, not the native `eager`. */ loading?: 'lazy' | 'eager' | undefined; /** * `object-fit`, emitted as an inline declaration. * @default undefined — no inline declaration. */ fit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down' | undefined; /** * `object-position`, emitted as an inline declaration. * @default undefined — no inline declaration. */ position?: string | undefined; /** * Rendered instead of the `` once loading fails. * @default undefined — the failed `` is left in place. */ fallback?: React.ReactNode | undefined; /** * Fires whenever the image's loading status changes. * @default undefined — no-op if omitted. */ onLoadingStatusChange?: ((status: ImageLoadingStatus) => void) | undefined; }