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.
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.
- srcstring
- The primary image URL.
- srcsetstring
- Responsive srcset string for the image.
- lazySrcstring
- Low-quality placeholder image URL shown while the main src loads.
- aspectRatiorequisnumber
- Intrinsic aspect ratio (width / height). Required to reserve layout space before the image loads.
- altstring
- 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