ViraImage: DeclarativeElementDefinition<
`vira-${string}`,
{
_debugLoadDelay?: Pick<
RequiredAndNotNull<Partial<Record<DurationUnit, number | undefined>>>,
Milliseconds,
>;
dominantDimension?: keyof Dimensions;
imageUrl: string;
},
{
erroredUrls: Readonly<{ [url: string]: true }>;
loadedUrls: Readonly<{ [url: string]: true }>;
},
{ imageError: DefineEvent<unknown>; imageLoad: DefineEvent<void> },
"vira-image-height-constrained",
`vira-${string}-`,
readonly ["vira-image-loading", "vira-image-error"],
readonly [],
> = ...
An
<img>element wrapper that handles size constraints and includes slots for loading and error indicators.Use CSS properties to constrain the image. In particular, set
min-heightandmin-widthon this to control the size of the loader and error slots.