ISrcObject

interface
Data Shapes

Structured image source descriptor for <OrigamImg>. Allows passing src, srcset, lazySrc, aspectRatio and alt as a single object to the src prop instead of individual attributes.

TypeScript

Définition

La définition TypeScript de l'interface telle que trouvée dans le code source d'origam. Cliquez sur l'icône de copie pour copier l'extrait.

typescript

API

Propriétés

Chaque propriété déclarée par cette interface, avec son type, son caractère optionnel et sa valeur par défaut.

src
string
The primary image URL.
srcset
string
Responsive srcset string for the image.
lazySrc
string
Low-quality placeholder image URL shown while the main src loads.
aspectRatio
requis
number
Intrinsic aspect ratio (width / height). Required to reserve layout space before the image loads.
alt
string
Alt text for the image. Forwarded to the underlying <img> element.

Écosystème

Utilisé par

Composants et composables qui étendent ou consomment cette interface.

Usage

Exemples

Extraits de code prêts à coller utilisant cette interface.

Passing an ISrcObject to OrigamImg

typescript