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
Definition
The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.
API
Properties
Every property declared by this interface, with its type, optionality and default.
- srcstring
- The primary image URL.
- srcsetstring
- Responsive srcset string for the image.
- lazySrcstring
- Low-quality placeholder image URL shown while the main src loads.
- aspectRatiorequirednumber
- 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.
Ecosystem
Used by
Components and composables that extend or consume this interface.
Usage
Examples
Ready-to-paste code snippets using this interface.
Passing an ISrcObject to OrigamImg