IImgProps
interface
Media
Props contract for OrigamImg — covers source, lazy loading, responsive sizes, gradient overlays, cross-origin policy, and transition configuration.
TypeScript
Definition
The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.
Inheritance
Extends
Parent interfaces this one inherits from. Their properties are available on every consumer of this interface.
API
Properties
Every property declared by this interface, with its type, optionality and default.
- altstring
- Alternative text for the image (required for a11y).
- coverboolean
- Apply object-fit: cover to fill the container without letterboxing.
- draggableboolean
- Whether the image is draggable.
- gradientstring
- CSS gradient string applied as an overlay on top of the image.
- lazySrcstring
- Low-resolution placeholder shown while the real src is loading.
- optionsIIntersectionObserverInit
- IntersectionObserver options for the lazy-load trigger.
- sizesstring
- HTML sizes attribute for responsive image selection.
- srcstring | ISrcObject
- Image source. Accepts a URL string or an ISrcObject with srcset and lazySrc.
- crossoriginTCrossOrigin
- CORS setting for the image request (anonymous or use-credentials).
- referrerpolicyTReferrerPolicy
- Referrer policy sent with the image request.
- srcsetstring
- HTML srcset attribute for responsive image selection.
- positionstring
- CSS object-position value (e.g. "top center").
Ecosystem
Used by
Components and composables that extend or consume this interface.
Usage
Examples
Ready-to-paste code snippets using this interface.
Responsive lazy image with a gradient overlay