ViraImage: DeclarativeElementDefinition<
"vira-image",
{
_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-image-",
readonly ["loading", "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-height
andmin-width
on this to control the size of the loader and error slots.