Aspect image
An image with a named aspect ratio that reserves its space before it loads.
Wide, square and portrait boxes reserve space before their images load.
Each preview is its own Live page in a frame, because this site is a Vue 3.5 app built on the Pulsar starter kit. An open list or popover stays inside its frame; in your application it opens over the page.
Installation
suprnova live:add aspect-imageUsage
{% import "suprnova-ui/aspect-image/aspect-image.html" as aspect_image %}
{% call aspect_image::aspect_image("/social-card.jpg", "Suprnova framework") %}{% endcall %}Keyboard and accessibility
suprnova.aspect-image - an image that reserves its box (DATA-001). The img itself carries the ratio, so no wrapper enters the document; the ratio is a named token, never a literal on the element.
API reference
aspect_image
| Parameter | Default | Description |
|---|---|---|
src | Required | The image URL. |
alt | Required | The text alternative describing the image. |
ratio | "wide" | The reserved aspect ratio: wide, square or portrait. |
loading | "lazy" | The native image loading hint: lazy or eager. |
