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.

typescript

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.

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").

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

vue