IImgProps

interface
Media

Props contract for OrigamImg — covers source, lazy loading, responsive sizes, gradient overlays, cross-origin policy, and transition configuration.

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

Héritage

Hérite de

Interfaces parentes dont celle-ci hérite. Leurs propriétés sont disponibles pour tout consommateur de cette interface.

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.

alt
string
Alternative text for the image (required for a11y).
cover
boolean
Apply object-fit: cover to fill the container without letterboxing.
draggable
boolean
Whether the image is draggable.
gradient
string
CSS gradient string applied as an overlay on top of the image.
lazySrc
string
Low-resolution placeholder shown while the real src is loading.
options
IIntersectionObserverInit
IntersectionObserver options for the lazy-load trigger.
sizes
string
HTML sizes attribute for responsive image selection.
src
string | ISrcObject
Image source. Accepts a URL string or an ISrcObject with srcset and lazySrc.
crossorigin
TCrossOrigin
CORS setting for the image request (anonymous or use-credentials).
referrerpolicy
TReferrerPolicy
Referrer policy sent with the image request.
srcset
string
HTML srcset attribute for responsive image selection.
position
string
CSS object-position value (e.g. "top center").

Écosystème

Utilisé par

Composants et composables qui étendent ou consomment cette interface.

Usage

Exemples

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

Responsive lazy image with a gradient overlay

vue